/* Giving Form Styles */
.giving-form-section {
    padding: 60px 0;
    background: #f4f6f9;
}

.giving-form-container {
    margin: 0 auto;
    background: #FFFFFF 0% 0% no-repeat padding-box;
    border-radius: 8px;
    overflow: hidden;
}

/* Giving info pages should use the full container width on PC.
   Keep the donation form's narrower .col-lg-8 / .col-xl-7 column. */
.giving-form-section .row.justify-content-center > .col-lg-10,
.giving-form-section .row.justify-content-center > .col-lg-12 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.giving-form-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: 600px;
}

/* Sidebar Navigation */
.giving-form-sidebar {
    background: transparent;
    padding: 30px 20px;
    border-right: 1px solid #e0e0e0;
}

.giving-form-sidebar .giving-sidebar-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.giving-form-sidebar h3 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--color-1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Roboto Slab', serif;
}

.giving-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.giving-sidebar-nav li {
    margin-bottom: 10px;
}

.giving-sidebar-nav a {
    display: block;
    padding: 12px 15px;
    color: var(--color-4);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 20px;
    border-left: 3px solid transparent;
}

.giving-sidebar-nav a:hover {
    background: #f5f5f5;
    color: var(--color-1);
    border-left-color: var(--color-4);
}

.giving-sidebar-nav a.active {
    color: var(--color-1);
    background: #f0f7ff;
    border-left-color: var(--color-4);
    font-weight: 600;
}

.giving-sidebar-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.giving-sidebar-section h4 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Roboto Slab', serif;
}

/* Collapsible Section Header */
.sidebar-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0;
    user-select: none;
    margin-bottom: 10px;
}

.sidebar-section-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.collapse-icon {
    color: #333;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.sidebar-section-header[aria-expanded="false"] .collapse-icon {
    transform: rotate(180deg);
}

/* Sidebar Menu Items */
.sidebar-menu-items {
    margin-top: 10px;
}

.sidebar-menu-items.collapse:not(.show) {
    display: none;
}

.sidebar-menu-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--color-4);
    text-decoration: none;
    font-weight: 500;
    font-size: 20px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-family: 'Roboto', sans-serif;
}

.sidebar-menu-link:hover {
    background: #f5f5f5;
    color: var(--color-1);
    border-left-color: var(--color-4);
}

/* Main Content Area */
.giving-form-content {
    padding: 40px;
}

.giving-form-title {
    color: #2B0065;
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
}

/* Email Search Section */
.email-search-section {
    background: #E7F4FE;
    border: 1px solid #B8BDC2;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 30px;
}

.email-search-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.email-search-group input {
    flex: 1;
    padding: 12px 15px;
    background: #FFFFFF;
    border: 1px solid #B8BDC2;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    color: #2B0065;
}

.email-search-group button {
    padding: 12px 30px;
    background: #2B0065;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.email-search-group button:hover {
    background: #1a003d;
}

/* Contact Form Section */
.contact-form-section {
    background: #E7F4FE;
    border: 1px solid #B8BDC2;
    border-radius: 18px;
    margin-bottom: 30px;
    overflow: hidden;
}

.contact-form-section .section-header-blue {
    background: var(--color-4);
    padding: 15px 25px;
}

.contact-form-section .section-header-blue h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
}

.contact-form-section .contact-form-content {
    padding: 25px;
}

.contact-form-section .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form-section .form-row:last-child {
    justify-content: center;
    display: flex;
}

.contact-form-section .btn-primary {
    padding: 15px 50px;
    background: #BA519E;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'Roboto Slab', serif;
}

.contact-form-section .btn-primary:hover {
    background: #9a3d82;
}

/* Campaign Dropdown */
.campaign-section {
    background: #E7F4FE;
    border: 1px solid #B8BDC2;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
}

.campaign-section select {
    width: 100%;
    padding: 12px 15px;
    background: #FFFFFF;
    border: 1px solid #B8BDC2;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    color: #2B0065;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.campaign-section select option {
    padding: 10px;
    background: white;
    color: #2B0065;
    font-family: 'Roboto', sans-serif;
}

/* Favorite Allocation Section */
.favorite-allocation-section {
    background: #E7F4FE;
    border: 1px solid #B8BDC2;
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 30px;
}

.favorite-allocation-section h3,
.campaign-section h3 {
    color: var(--color-1);
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
}

.allocation-category {
    background: white;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.allocation-category h4 {
    color: #c2185b;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-family: 'Roboto Slab', serif;
    font-weight: 600;
}

.allocation-checkboxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-1);
}

.checkbox-item label {
    cursor: pointer;
    color: #2B0065;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
}

/* Fund Category Dropdown */
.fund-category-section {
    background: #E7F4FE;
    border: 1px solid #B8BDC2;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
}

.fund-category-section select {
    width: 100%;
    padding: 12px 15px;
    background: #FFFFFF;
    border: 1px solid #B8BDC2;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    color: #2B0065;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.fund-category-section select option {
    padding: 10px;
    background: white;
    color: #2B0065;
    font-family: 'Roboto', sans-serif;
}

/* Cart Section */
.cart-section {
    margin-top: 30px;
    scroll-margin-top: 112px;
    transition: box-shadow 0.35s ease;
}

.cart-section-title {
    color: var(--color-1);
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
}

.cart-section-hint {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    color: var(--gray, #5A5A5A);
}

.cart-section.cart-section-highlight {
    box-shadow: 0 0 0 3px #FED72D;
    border-radius: 8px;
}

.cart-header {
    background: var(--color-4);
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 50px;
    gap: 15px;
    font-weight: 600;
    font-size: 1.1rem;
}

.cart-items {
    border: 1px solid #dee2e6;
    border-top: none;
    background: transparent;
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 50px;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    align-items: center;
    transition: background 0.2s ease;
    font-family: 'Roboto Slab', serif;
}

.cart-item:nth-child(odd) {
    background: #FFFFFF;
}

.cart-item:nth-child(even) {
    background: #F7F7F7;
}

.cart-item:hover {
    opacity: 0.95;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-name {
    color: #2B0065;
    font-weight: 600;
    font-family: 'Roboto Slab', serif;
}

.cart-item-type {
    color: #2B0065;
    font-family: 'Roboto Slab', serif;
}

.cart-item-amount input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Roboto Slab', serif;
    color: #2B0065;
}

.cart-item-remove {
    text-align: center;
}

.remove-btn {
    background: none;
    border: none;
    color: #c2185b;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease;
}

.remove-btn:hover {
    color: #880e4f;
}

/* Cart Total */
.cart-total {
    background: #2B0065;
    border: 1px solid #B8BDC2;
    border-radius: 0 0 10px 10px;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Roboto Slab', serif;
}

.cart-total-label {
    font-size: 1.5rem;
}

.cart-total-amount {
    font-size: 1.8rem;
}

/* Continue Button */
.continue-section {
    text-align: center;
    margin-top: 30px;
}

.btn-continue {
    padding: 15px 50px;
    background: #BA519E;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'Roboto Slab', serif;
}

.btn-continue:hover {
    background: #9a3d82;
}

/* Empty Cart Message */
.empty-cart-message {
    text-align: center;
    padding: 60px 40px;
    color: #2B0065;
    font-size: 1.1rem;
    font-family: 'Roboto', sans-serif;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

.empty-cart-message i {
    display: block;
    margin-bottom: 15px;
}

.empty-cart-message p:first-of-type {
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0;
}

.empty-cart-message p:last-of-type {
    margin: 10px 0 0 0;
    font-size: 0.95rem;
    color: #666;
}

/* Responsive Design */
@media (max-width: 992px) {
    .giving-form-layout {
        grid-template-columns: 1fr;
        display: block;
    }

    .giving-form-sidebar {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        width: 100%;
    }

    .giving-form-content {
        width: 100%;
    }

    .cart-header,
    .cart-item {
        grid-template-columns: 1.5fr 1fr 1fr 40px;
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .giving-form-content {
        padding: 20px;
    }

    .allocation-checkboxes {
        grid-template-columns: 1fr;
    }

    .cart-header {
        display: none;
    }

    .cart-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .cart-item-remove {
        text-align: right;
    }

    .email-search-group {
        flex-direction: column;
    }

    .email-search-group button {
        width: 100%;
    }

    /* Ensure sections are visible on mobile */
    .campaign-section,
    .favorite-allocation-section,
    .fund-category-section,
    .cart-section {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}


/* Multi-Step Form */
.form-step {
    /* Don't hide by default - let inline styles control visibility */
}

.form-step.active {
    display: block;
}

#step-2 {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 3px solid #e0e0e0;
}

/* Contact Details Section */
.contact-details-section {
    background: #E7F4FE;
    border: 1px solid #B8BDC2;
    border-radius: 18px;
    margin-bottom: 30px;
    overflow: hidden;
}

.section-header-blue {
    background: var(--color-4);
    padding: 15px 25px;
}

.section-header-blue h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
}

.contact-form-content {
    padding: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-input {
    padding: 12px 15px;
    background: #FFFFFF;
    border: 1px solid #B8BDC2;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Roboto Slab', serif;
    color: #2B0065;
}

.form-input::placeholder {
    color: #999;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-1);
    box-shadow: 0 0 0 3px rgba(72, 156, 214, 0.25);
}

.form-input:focus-visible {
    outline: 2px solid var(--color-4);
    outline-offset: 2px;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* Matching Gift Section */
.matching-gift-section {
    background: #E7F4FE;
    border: 1px solid #B8BDC2;
    border-radius: 18px;
    margin-bottom: 30px;
    overflow: hidden;
}

.matching-gift-content {
    padding: 25px;
}

/* Payment Methods Section */
.payment-methods-section {
    background: #E7F4FE;
    border: 1px solid #B8BDC2;
    border-radius: 18px;
    margin-bottom: 30px;
    overflow: hidden;
}

.payment-methods-content {
    padding: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.payment-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    background: white;
    border: 2px solid #B8BDC2;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Roboto Slab', serif;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.payment-btn i {
    font-size: 1.2rem;
}

.payment-btn:hover {
    border-color: #2B0065;
    color: #2B0065;
}

.payment-btn.active {
    background: #2B0065;
    border-color: #2B0065;
    color: white;
}

/* Company Name Field (Employee Portal) */
.company-name-section {
    margin-top: 15px;
    padding: 15px 20px;
    background: #E7F4FE;
    border: 1px solid #B8BDC2;
    border-radius: 8px;
}

.company-name-section label {
    font-weight: 600;
    color: #2B0065;
    margin-bottom: 6px;
    display: block;
}

.company-name-section .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #B8BDC2;
    border-radius: 6px;
    font-size: 0.95rem;
}

.btn-review {
    background: #BA519E;
}

.btn-review:hover {
    background: #9a3d82;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .payment-methods-content {
        flex-direction: column;
    }
    
    .payment-btn {
        min-width: 100%;
    }
}


/* Custom Modal Dialog */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.custom-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: #2B0065;
    color: white;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 30px 25px;
    font-family: 'Roboto', sans-serif;
    color: #2B0065;
    font-size: 1.1rem;
    line-height: 1.6;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-modal {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Roboto Slab', serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal-primary {
    background: #BA519E;
    color: white;
}

.btn-modal-primary:hover {
    background: #9a3d82;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(186, 81, 158, 0.4);
}

.btn-modal-secondary {
    background: #e0e0e0;
    color: #666;
}

.btn-modal-secondary:hover {
    background: #d0d0d0;
}

/* Success Modal Variant */
.modal-header.success {
    background: #4CAF50;
}

/* Error Modal Variant */
.modal-header.error {
    background: #f44336;
}

/* Warning Modal Variant */
.modal-header.warning {
    background: #ff9800;
}


/* Sidebar Section Link */
.sidebar-section-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar-section-link:hover {
    color: var(--color-4);
}

.sidebar-section-link.active-link {
    color: var(--color-1);
    font-weight: 700;
}

/* Primary sidebar entry — Giving Form */
.giving-sidebar-primary {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    margin-bottom: 10px;
}

.sidebar-primary-link {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #2B0065 0%, #4a148c 100%);
    color: #ffffff;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
    transition: background 0.2s ease, transform 0.2s ease;
}

.sidebar-primary-link:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #4a148c 0%, #2B0065 100%);
    transform: translateY(-1px);
}

.sidebar-primary-link.active-link {
    color: #2B0065;
    background: #FED72D;
    box-shadow: 0 4px 12px rgba(43, 0, 101, 0.15);
}

.sidebar-primary-link.active-link:hover {
    color: #2B0065;
    background: #e6c429;
}

.sidebar-primary-note {
    margin: 8px 0 0;
    font-size: 0.82rem;
    color: #666;
    line-height: 1.4;
}

.sidebar-group-label {
    margin: 18px 0 8px;
    padding: 0 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888;
}

.sidebar-section-link.coming-soon {
    color: #999;
    cursor: default;
    pointer-events: none;
}

.coming-soon-label {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Return-to-form banner on secondary giving pages */
.giving-form-return-banner {
    background: #eef3f9;
    border: 1px solid #BED5EF;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.giving-form-return-banner p {
    margin: 0;
    font-weight: 500;
    color: #2B0065;
}

.giving-form-return-banner .btn-return-form {
    background-color: #2B0065;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.giving-form-return-banner .btn-return-form:hover {
    background-color: #4a148c;
    color: #ffffff;
}

/* Streamlined giving-form page (MIT-style focus layout) */
.giving-form-page main {
    background: #f4f6f9;
}

.giving-form-utility-nav {
    background: #ffffff;
    border-bottom: 1px solid #e3e8ef;
    padding: 10px 0;
}

.utility-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.utility-nav-label {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #888;
    white-space: nowrap;
}

.utility-nav-label-extra {
    display: none;
}

.utility-nav-collapse > summary {
    list-style: none;
}

.utility-nav-collapse > summary::-webkit-details-marker {
    display: none;
}

@media (min-width: 769px) {
    .utility-nav-collapse > summary {
        cursor: default;
        pointer-events: none;
    }
}

.utility-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    justify-content: flex-end;
}

.utility-nav-item {
    position: relative;
}

.utility-nav-list a,
.utility-nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 1rem;
    font-weight: 500;
    color: #2B0065;
    text-decoration: none;
    background: none;
    border: none;
    padding: 5px 7px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.utility-nav-list a:hover,
.utility-nav-trigger:hover,
.utility-nav-has-menu.open .utility-nav-trigger {
    background: #eef3f9;
    color: #4a148c;
}

.utility-nav-trigger i {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.utility-nav-has-menu.open .utility-nav-trigger i {
    transform: rotate(180deg);
}

.utility-nav-submenu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 210px;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background: #ffffff;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(43, 0, 101, 0.1);
    z-index: 20;
}

.utility-nav-has-menu.open .utility-nav-submenu {
    display: block;
}

.utility-nav-submenu a {
    display: block;
    padding: 8px 16px;
    border-radius: 0;
    font-size: 0.9rem;
}

.utility-nav-disabled {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: #999;
    padding: 6px 8px;
}

.utility-nav-disabled small {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.utility-nav-current {
    display: inline-flex;
    align-items: center;
    font-size: 0.84rem;
    font-weight: 700;
    color: #2B0065;
    padding: 5px 7px;
    border-radius: 6px;
    background: #eef3f9;
}

.giving-info-placeholder {
    padding: 24px 0;
    color: #4a5568;
    font-size: 1.05rem;
    line-height: 1.6;
}

.checkout-email-section {
    margin-top: 28px;
}

.checkout-email-note {
    margin: 0 0 12px;
    color: #5A5A5A;
    font-size: 0.95rem;
}

.checkout-review-section {
    margin-top: 28px;
}

.checkout-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-cancel-checkout {
    padding: 15px 36px;
    background: #ffffff;
    color: #2B0065;
    border: 2px solid #2B0065;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    font-family: 'Roboto Slab', serif;
}

.btn-cancel-checkout:hover {
    background: #eef3f9;
}

#step-1 .payment-methods-section {
    margin-top: 30px;
}

.giving-form-focused {
    padding: 32px 0 48px;
    background: #f4f6f9;
    background-image: none;
}

.giving-form-container-focused {
    box-shadow: 0 10px 40px rgba(43, 0, 101, 0.08);
    border: 1px solid #e8edf3;
}

.giving-form-content-header {
    padding: 28px 40px 0;
    text-align: center;
    border-bottom: 1px solid #eef2f6;
}

.giving-form-content-header .giving-form-title {
    margin-bottom: 10px;
    font-size: 2rem;
}

.giving-form-lead {
    margin: 0 0 24px;
    font-size: 1rem;
    line-height: 1.5;
    color: #5A5A5A;
    font-family: 'Roboto', sans-serif;
}

.giving-form-lead a,
.giving-form-lead a:visited {
    color: #2B0065;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    -webkit-text-fill-color: #2B0065;
}

.giving-form-lead a:hover {
    color: #4a148c;
    -webkit-text-fill-color: #4a148c;
}

.giving-form-content-focused {
    padding-top: 28px;
}

@media (max-width: 768px) {
    .utility-nav-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .utility-nav-collapse > summary {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 12px;
        white-space: normal;
        text-transform: none;
        letter-spacing: 0;
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--color-1);
        background: #E7F4FE;
        border: 1px solid #B8BDC2;
        border-radius: 8px;
        line-height: 1.3;
    }

    .utility-nav-label-extra {
        display: inline;
        font-weight: 400;
        color: var(--gray, #5A5A5A);
        text-transform: none;
        letter-spacing: 0;
    }

    .utility-nav-collapse > summary::after {
        content: '\f107';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        color: var(--color-1);
        margin-left: 8px;
    }

    .utility-nav-collapse[open] > summary::after {
        content: '\f106';
    }

    .utility-nav-list {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px 8px;
        justify-content: stretch;
    }

    .utility-nav-item {
        min-width: 0;
    }

    .utility-nav-list a,
    .utility-nav-trigger,
    .utility-nav-current {
        width: 100%;
        justify-content: flex-start;
        white-space: normal;
        line-height: 1.25;
        padding: 8px 10px;
        font-size: 0.92rem;
    }

    .utility-nav-submenu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 12px;
        margin-top: 4px;
    }

    .giving-form-content-header,
    .giving-form-content-focused {
        padding-left: 20px;
        padding-right: 20px;
    }

    .giving-form-content-header {
        padding-top: 20px;
    }

    .giving-form-page .giving-form-focused {
        padding-bottom: 96px;
    }

    .giving-form-page .campaign-section,
    .giving-form-page .favorite-allocation-section,
    .giving-form-page .fund-category-section,
    .giving-form-page .cart-section {
        margin-bottom: 18px;
    }

    .giving-form-page #step-1.form-step.active {
        display: flex;
        flex-direction: column;
    }

    /* Same order as the HTML (and the inline #ios-giving-form-order block). */
    .giving-form-page #campaign-section { order: 1; }
    .giving-form-page #favorite-allocation-section { order: 2; }
    .giving-form-page #fund-category-section { order: 3; }
    .giving-form-page #cart-section { order: 4; }
    .giving-form-page .payment-methods-section { order: 5; }
    .giving-form-page #company-name-section { order: 6; }
    .giving-form-page #step-1-actions { order: 7; }

    .giving-form-page .cart-section {
        margin-top: 0;
        padding: 16px;
        background: #ffffff;
        border: 1px solid #e3e8ef;
        border-radius: 12px;
    }

    .giving-form-page .cart-section-title {
        margin-bottom: 6px;
    }

    .giving-form-page .cart-total {
        background: var(--color-1);
        color: #ffffff;
        border: 1px solid var(--color-1);
        border-radius: 10px;
        padding: 12px 14px;
        margin-top: 12px;
        box-shadow: 0 4px 14px rgba(43, 0, 101, 0.18);
    }

    .giving-form-page .copyright {
        padding-bottom: calc(20px + 76px + env(safe-area-inset-bottom, 0px));
    }

    .giving-form-page .checkout-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        margin: 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid #e3e8ef;
        box-shadow: 0 -6px 20px rgba(43, 0, 101, 0.08);
        justify-content: space-between;
        gap: 10px;
    }

    .giving-form-page .checkout-actions .btn-cancel-checkout,
    .giving-form-page .checkout-actions .btn-continue {
        flex: 1 1 auto;
        min-width: 0;
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: 8px;
    }
}

/* Email Exists Badge */
.email-exists-badge {
    margin-top: 15px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.badge-content i.fa-check-circle {
    font-size: 24px;
    color: #4ade80;
}

.badge-content span {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

.btn-edit-email {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-edit-email:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-edit-email i {
    font-size: 14px;
}

/* Loading Spinner */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content i {
    color: #667eea;
    margin-bottom: 20px;
}

.loading-content p {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

/* Contact Not Found Message */
.contact-not-found-message {
    margin-top: 15px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    animation: slideIn 0.3s ease-out;
}

.contact-not-found-message .message-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.contact-not-found-message i.fa-info-circle {
    font-size: 24px;
    color: #fef3c7;
}

.contact-not-found-message span {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

.btn-edit-email-small {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-edit-email-small:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Save Contact Button */
.btn-save-contact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    width: 100%;
    margin-top: 20px;
}

.btn-save-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-save-contact:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}


/* Edit Contact Button in Header */
.btn-edit-contact {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Roboto', sans-serif;
}

.btn-edit-contact:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.7);
}

/* Readonly state for contact fields */
.contact-field[readonly] {
    background: #f0f0f0;
    cursor: default;
    opacity: 0.85;
}

select.contact-field[disabled] {
    background: #f0f0f0;
    cursor: default;
    opacity: 0.85;
}
