/* ===============================
   CLIMATE DAO TREASURY STYLES
   Beautiful green & blue theme
   WITH CANCELLATION FEE UI
   =============================== */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body & Container */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: linear-gradient(135deg, #0ea5e9 0%, #10b981 50%, #059669 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
    color: #1f2937;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.6s ease;
}

.header-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    animation: bounce 2s infinite;
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Header Badge - NEW */
.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin-top: 1rem;
    animation: pulse 2s infinite;
}

.badge-icon {
    font-size: 1.125rem;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Wallet Section */
.wallet-section {
    text-align: center;
    margin-bottom: 2rem;
}

.wallet-info {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.4s ease;
}

.info-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallet-address {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #059669;
    word-break: break-all;
    background: #f0fdf4;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 2px solid #bbf7d0;
}

/* Fee Calculator - NEW */
.fee-calculator {
    margin-top: 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    border-radius: 0.75rem;
    padding: 1.25rem;
    animation: slideDown 0.3s ease;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
}

.fee-row + .fee-row {
    border-top: 1px solid rgba(251, 191, 36, 0.3);
}

.fee-label {
    color: #78350f;
    font-weight: 600;
}

.fee-value {
    color: #92400e;
    font-weight: 700;
    font-size: 1.0625rem;
}

.fee-highlight {
    background: rgba(255, 255, 255, 0.5);
    margin: 0 -0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.fee-highlight .fee-value {
    color: #059669;
    font-size: 1.25rem;
}

.fee-deduction {
    background: rgba(239, 68, 68, 0.1);
    margin: 0 -0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.fee-deduction .fee-value {
    color: #dc2626;
    font-size: 1.125rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fee Example Box - NEW */
.fee-example-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #93c5fd;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.fee-example-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fee-example-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fee-example-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
}

.fee-example-amount {
    font-weight: 700;
    font-size: 1.125rem;
}

.fee-example-refund {
    background: #d1fae5;
    border: 2px solid #10b981;
}

.fee-example-refund .fee-example-amount {
    color: #059669;
    font-size: 1.375rem;
}

.fee-example-fee {
    background: #fee2e2;
    border: 2px solid #ef4444;
}

.fee-example-fee .fee-example-amount {
    color: #dc2626;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid transparent;
    border-radius: 1rem;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.tab-btn.active {
    background: white;
    color: #059669;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: white;
}

.tab-icon {
    font-size: 1.25rem;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: slideUp 0.4s ease;
}

/* Panel */
.panel {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    margin-bottom: 1.5rem;
}

.panel-title {
    font-size: 1.75rem;
    color: #059669;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

.panel-icon {
    font-size: 2rem;
}

.description-box {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    color: #065f46;
    line-height: 1.6;
}

.description-box strong {
    color: #047857;
    font-weight: 700;
}

.description-box p + p {
    margin-top: 0.5rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.required {
    color: #ef4444;
    font-weight: 700;
}

.input-field {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
    background: #fafafa;
}

.input-field:focus {
    outline: none;
    border-color: #10b981;
    background: white;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.input-field::placeholder {
    color: #9ca3af;
}

.help-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

/* Deadline Helper */
.deadline-helper {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.time-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.time-icon {
    font-size: 1.125rem;
}

.deadline-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Recipient Section */
.recipient-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 2px solid #bbf7d0;
    padding: 1.75rem;
    border-radius: 1rem;
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    font-size: 2rem;
    background: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.section-title {
    font-size: 1.25rem;
    color: #065f46;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.section-subtitle {
    font-size: 0.875rem;
    color: #059669;
}

/* Validation Messages */
.validation-message {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

.validation-message.success {
    color: #065f46;
    background: #d1fae5;
}

.validation-message.error {
    color: #991b1b;
    background: #fee2e2;
}

/* Alerts */
.alert {
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    border: 2px solid;
}

.alert-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.alert-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alert-list li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.alert-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    font-weight: 700;
    font-size: 1.25rem;
}

.alert-list li strong {
    font-weight: 700;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-warning strong {
    color: #78350f;
}

.alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.alert-info strong {
    color: #1e3a8a;
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #065f46;
}

.alert-success strong {
    color: #047857;
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.status-item {
    background: #f9fafb;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
}

.status-item.highlight {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.status-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.status-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    word-break: break-all;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-large {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
}

.btn-small {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.btn-icon {
    font-size: 1.25rem;
}

.btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0891b2 100%);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.btn-outline {
    background: white;
    color: #059669;
    border: 2px solid #10b981;
}

.btn-outline:hover {
    background: #f0fdf4;
    border-color: #059669;
}

/* Log Section */
.log-section {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.log-title {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.log-icon {
    font-size: 1.5rem;
}

.log-output {
    background: #1f2937;
    border: 2px solid #374151;
    border-radius: 0.75rem;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #10b981;
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    word-break: break-all;
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header-icon {
        font-size: 3rem;
    }

    .header-badge {
        font-size: 0.75rem;
        padding: 0.625rem 1.25rem;
    }

    .panel {
        padding: 1.5rem;
    }

    .panel-title {
        font-size: 1.5rem;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        min-width: auto;
    }

    .deadline-buttons {
        flex-direction: column;
    }

    .btn-small {
        width: 100%;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .fee-calculator {
        padding: 1rem;
    }

    .fee-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .fee-value {
        font-size: 1.125rem;
    }
}

/* Scrollbar */
.log-output::-webkit-scrollbar {
    width: 8px;
}

.log-output::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 4px;
}

.log-output::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 4px;
}

.log-output::-webkit-scrollbar-thumb:hover {
    background: #059669;
}
