/* ============================================
   CONFIRM INVESTMENT MODAL STYLES
   ============================================ */

/* ============================================
   SECTION 1: MODAL OVERLAY & CONTAINER
   ============================================ */
.confirm-investment {
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px;
        z-index: 9999;
        direction: ltr;
    }

    .modal-container {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 64px 33px;
        gap: 32px;
        width: 100%;
        max-width: 672px;
        min-height: 858.36px;
        background: #FFFFFF;
        border: 1px solid #E5E7EB;
        border-radius: 24px;
        position: relative;
        overflow-y: auto;
        max-height: 90vh;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    /* ============================================
       SECTION 2: MODAL HEADER
       ============================================ */

    .modal-header {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        padding: 0;
        gap: 239.48px;
        width: 100%;
        min-height: 68px;
        border-radius: 0;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    .close-btn {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 8px 0;
        width: 40px;
        height: 40px;
        border-radius: 16px;
        background: transparent;
        border: none;
        cursor: pointer;
        transition: background-color 0.3s ease;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    .close-btn:hover {
        background: #F7F7F8;
    }

    .close-btn svg {
        width: 24px;
        height: 24px;
        flex: none;
        order: 0;
        align-self: stretch;
        flex-grow: 0;
    }

    .header-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
        padding: 0;
        gap: 8px;
        width: 326.52px;
        height: 68px;
        border-radius: 0;
        flex: none;
        order: 1;
        flex-grow: 0;
    }

    .modal-title {
        width: 138px;
        height: 38px;
        font-family: 'IBM Plex Sans Arabic', sans-serif;
        font-style: normal;
        font-weight: 600;
        font-size: 25px;
        line-height: 150%;
        color: #0B3C40;
        margin: 0;
        text-align: right;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    .modal-subtitle {
        width: 301px;
        height: 24px;
        font-family: 'IBM Plex Sans Arabic', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 16px;
        line-height: 150%;
        color: #768284;
        margin: 0;
        text-align: right;
        flex: none;
        order: 1;
        flex-grow: 0;
    }

    /* ============================================
       SECTION 3: INVESTMENT DETAILS CARD
       ============================================ */

    .investment-details-card {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        padding: 16px;
        gap: 8px;
        width: 100%;
        min-height: 87px;
        background: #F7F7F8;
        border-radius: 16px;
        flex: none;
        order: 1;
        align-self: stretch;
        flex-grow: 0;
    }

    .investment-info {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        padding: 0;
        gap: 8px;
        width: 422.05px;
        height: 55px;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    .investment-title {
        height: 27px;
        font-family: 'IBM Plex Sans Arabic', sans-serif;
        font-style: normal;
        font-weight: 600;
        font-size: 18px;
        line-height: 27px;
        color: #0B3C40;
        margin: 0;
        text-align: right;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    .investment-location {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0;
        gap: 8px;
        width: 422.05px;
        height: 20px;
        flex: none;
        order: 1;
        flex-grow: 0;
    }

    .location-icon {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        flex: none;
        order: 1;
        flex-grow: 0;
    }

    .location-text {
        width: 112px;
        height: 20px;
        font-family: 'Tajawal', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 14px;
        line-height: 20px;
        color: #4A5565;
        text-align: right;
        flex: none;
        order: 0;
        flex-grow: 1;
    }

    /* ============================================
       SECTION 4: FORM SECTION
       ============================================ */

    .form-section {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        padding: 0;
        gap: 24px;
        width: 100%;
        min-height: 299.36px;
        flex: none;
        order: 2;
        align-self: stretch;
        flex-grow: 0;
    }

    .form-group {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        gap: 8px;
        width: 100%;
        min-height: 83.79px;
        flex: none;
        align-self: stretch;
        flex-grow: 0;
    }

    .form-label {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        padding: 0;
        gap: 10px;
        width: 100%;
        height: 20px;
        font-family: 'ABeeZee', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 13px;
        line-height: 150%;
        text-align: right;
        color: #364153;
        flex: none;
        align-self: stretch;
        flex-grow: 0;
    }

    .form-label .required {
        color: #EF4444;
    }

    .form-input {
        box-sizing: border-box;
        width: 100%;
        height: 55.79px;
        padding: 16px 20px;
        border: 1px solid #D8D9D9;
        border-radius: 99px;
        font-family: 'IBM Plex Sans Arabic', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 16px;
        line-height: 150%;
        color: #0B3C40;
        background: #FFFFFF;
        text-align: right;
        transition: border-color 0.3s ease;
        flex: none;
        align-self: stretch;
        flex-grow: 0;
    }

    .form-input:focus {
        outline: none;
        border-color: #0B3C40;
    }

    .form-input::placeholder {
        color: #99A1AF;
    }

    /* ============================================
       SECTION 5: INVESTMENT AMOUNT SECTION
       ============================================ */

    .investment-amount-section {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        gap: 8px;
        width: 100%;
        min-height: 128px;
        flex: none;
        order: 2;
        align-self: stretch;
        flex-grow: 0;
    }

    .amount-label {
        width: 100%;
        height: 24px;
        font-family: 'ABeeZee', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 13px;
        line-height: 150%;
        text-align: right;
        color: #364153;
        margin: 0;
        flex: none;
        align-self: stretch;
        flex-grow: 0;
    }

    .amount-display-card {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 18px 2px;
        width: 100%;
        min-height: 96px;
        background: #FFECBD;
        border: 2px solid rgba(11, 60, 64, 0.3);
        border-radius: 20px;
        flex: none;
        order: 1;
        align-self: stretch;
        flex-grow: 0;
    }

    .amount-content {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0;
        gap: 16px;
        width: 100%;
        min-height: 60px;
        flex: none;
        align-self: stretch;
        flex-grow: 0;
    }

    .amount-icon {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    .amount-icon svg {
        width: 100%;
        height: 100%;
    }

    .amount-info {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        padding: 0;
        gap: 4px;
        width: 136.8px;
        height: 60px;
        flex: none;
        order: 1;
        flex-grow: 0;
    }

    .amount-value {
        width: 138px;
        height: 38px;
        font-family: 'IBM Plex Sans Arabic', sans-serif;
        font-style: normal;
        font-weight: 600;
        font-size: 25px;
        line-height: 150%;
        color: #0B3C40;
        text-align: right;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    .amount-details {
        width: 120px;
        height: 20px;
        font-family: 'IBM Plex Sans Arabic', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 13px;
        line-height: 150%;
        color: #4A5565;
        text-align: right;
        flex: none;
        order: 1;
        flex-grow: 0;
    }

    /* ============================================
       SECTION 6: TERMS CHECKBOX SECTION
       ============================================ */

    .terms-checkbox-section {
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        padding: 5px;
        gap: 12px;
        width: 100%;
        background: #F9FAFB;
        border: 2px solid #E5E7EB;
        border-radius: 20px;
        flex: none;
        order: 2;
        align-self: stretch;
        flex-grow: 0;
    }

    .checkbox-label {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 16px;
        gap: 12px;
        width: 100%;
        cursor: pointer;
        justify-content: end;
    }

    .checkbox-input {
        box-sizing: border-box;
        width: 20px;
        height: 20px;
        border: 2px solid #99A1AF;
        border-radius: 16px;
        cursor: pointer;
        flex-shrink: 0;
        margin-top: -2px;
        flex: none;
        order: 1;
        flex-grow: 0;
    }

    .checkbox-input:checked {
        background: #0B3C40;
        border-color: #0B3C40;
    }

    .checkbox-text {
        flex: 1;
        width: 100%;
        height: 20px;
        font-family: 'Tajawal', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 14px;
        line-height: 25px;
        text-align: right;
        color: #364153;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    /* ============================================
       SECTION 7: CONFIRM BUTTON SECTION
       ============================================ */

    .confirm-button-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        gap: 15px;
        width: 100%;
        min-height: 111px;
        flex: none;
        order: 3;
        align-self: stretch;
        flex-grow: 0;
    }

    .btn-confirm {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 16px 22px;
        gap: 10px;
        width: 100%;
        height: 56px;
        background: #E7ECEC;
        box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
        border-radius: 99px;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        flex: none;
        order: 0;
        align-self: stretch;
        flex-grow: 0;
    }

    .btn-confirm:not(:disabled) {
        background: #0B3C40;
    }

    .btn-confirm:not(:disabled) .btn-text {
        color: #FFFFFF;
    }

    .btn-confirm:not(:disabled) .check-icon path {
        stroke: #FFFFFF;
    }

    .btn-confirm:not(:disabled):hover {
        background: #0D2D36;
        transform: translateY(-2px);
        box-shadow: 0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -2px rgba(0, 0, 0, 0.1);
    }

    .btn-confirm:disabled {
        cursor: not-allowed;
        opacity: 0.7;
    }

    .btn-text {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 0 2px;
        gap: 4px;
        height: 21px;
        font-family: 'ABeeZee', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 18px;
        line-height: 21px;
        color: #768284;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    .check-icon {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
        flex: none;
        order: 1;
        flex-grow: 0;
    }

    .footer-message {
        width: 100%;
        max-width: 364px;
        height: 20px;
        font-family: 'ABeeZee', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 13px;
        line-height: 150%;
        text-align: center;
        color: #6A7282;
        margin: 0;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    /* ============================================
       SECTION 8: RESPONSIVE STYLES
       ============================================ */

    /* Tablet (992px) */
    @media (max-width: 992px) {
        .modal-container {
            padding: 28px 24px;
            gap: 28px;
            max-width: 90%;
        }

        .modal-header {
            gap: 20px;
        }

        .header-content {
            flex: 1;
            min-width: 200px;
            width: auto;
        }

        .modal-title {
            width: auto;
        }

        .modal-subtitle {
            width: auto;
        }
    }

    /* Mobile (768px) */
    @media (max-width: 768px) {
        .modal-overlay {
            padding: 16px;
        }

        .modal-container {
            padding: 24px 20px;
            gap: 24px;
            max-width: 100%;
            min-height: auto;
        }

        .modal-header {
            gap: 16px;

        }


        .header-content {
            width: 100%;
            align-items: flex-end;
            height: auto;
        }

        .modal-title {
            font-size: 22px;
            width: auto;
            height: auto;
        }

        .modal-subtitle {
            font-size: 14px;
            width: 100%;
            height: auto;
        }

        .investment-details-card {
            padding: 14px;
        }

        .investment-info {
            width: 100%;
        }

        .investment-title {
            font-size: 16px;
            width: auto;
        }

        .investment-location {
            width: 100%;
        }

        .form-section {
            align-items: flex-start;
        }

        .form-input {
            height: 50px;
            font-size: 15px;
        }

        .amount-display-card {
            padding: 16px;
        }

        .amount-content {
            gap: 12px;
        }

        .amount-value {
            font-size: 22px;
            width: auto;
        }

        .amount-details {
            font-size: 12px;
            width: auto;
        }

        .btn-confirm {
            height: 52px;
        }

        .btn-text {
            font-size: 16px;
        }
    }

    /* Small Mobile (576px) */
    @media (max-width: 576px) {
        .modal-overlay {
            padding: 12px;
        }

        .modal-container {
            padding: 20px 16px;
            gap: 20px;
            border-radius: 20px;
        }

        .modal-title {
            font-size: 20px;
            height: auto;
        }

        .modal-subtitle {
            font-size: 13px;
            height: auto;
        }

        .investment-details-card {
            padding: 12px;
            min-height: auto;
        }

        .investment-title {
            font-size: 15px;
            height: auto;
        }

        .location-text {
            font-size: 13px;
        }

        .form-group {
            gap: 6px;
            min-height: auto;
        }

        .form-label {
            font-size: 12px;
            height: auto;
        }

        .form-input {
            height: 48px;
            padding: 14px 18px;
            font-size: 14px;
        }

        .amount-display-card {
            padding: 14px;
            min-height: auto;
        }

        .amount-content {
            gap: 12px;
            min-height: auto;
        }

        .amount-icon {
            width: 36px;
            height: 36px;
        }

        .amount-value {
            font-size: 20px;
            height: auto;
        }

        .amount-details {
            font-size: 11px;
            height: auto;
        }

        .terms-checkbox-section {
            padding: 12px 0 0;
            min-height: auto;
        }

        .checkbox-label {
            padding: 12px;
            gap: 10px;
        }

        .checkbox-input {
            width: 20px;
            height: 20px;
        }

        .checkbox-text {
            font-size: 13px;
            height: auto;
        }

        .confirm-button-section {
            gap: 12px;
            min-height: auto;
        }

        .btn-confirm {
            height: 50px;
            padding: 14px 20px;
        }

        .btn-text {
            font-size: 15px;
            height: auto;
        }

        .footer-message {
            font-size: 12px;
            height: auto;
        }
    }

    /* ============================================
       SECTION 9: SUCCESS POPUP MODAL
       ============================================ */

    .success-popup-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        display: none;
        justify-content: center;
        align-items: center;
        padding: 20px;
        z-index: 10000;
    }

    .success-popup-container {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 24px;
        gap: 22px;
        width: 100%;
        max-width: 448px;
        min-height: 433px;
        background: #FFFFFF;
        border: 1px solid rgba(212, 175, 55, 0.3);
        border-radius: 24px;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    .success-icon-wrapper {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 0;
        width: 96px;
        height: 96px;
        background: #FFECBD;
        border-radius: 50%;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    .success-icon-circle {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        width: 48px;
        height: 48px;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    .success-check-icon {
        width: 48px;
        height: 48px;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    .success-title {
        width: 123px;
        height: 38px;
        font-family: 'IBM Plex Sans Arabic', sans-serif;
        font-style: normal;
        font-weight: 600;
        font-size: 25px;
        line-height: 150%;
        text-align: center;
        color: #1C2628;
        margin: 0;
        flex: none;
        order: 1;
        flex-grow: 0;
    }

    .success-details-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
        gap: 12px;
        width: 100%;
        max-width: 400px;
        min-height: 132px;
        background: #F9FAFB;
        border-radius: 16px;
        flex: none;
        order: 2;
        align-self: stretch;
        flex-grow: 0;
    }

    .success-detail-row {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        padding: 0;
        width: 100%;
        height: 20px;
        flex: none;
        align-self: stretch;
        flex-grow: 0;
    }

    .success-detail-value {
        font-family: 'ABeeZee', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 18px;
        line-height: 21px;
        text-align: center;
        color: #0B3C40;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    .success-detail-label {
        font-family: 'IBM Plex Sans Arabic', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 16px;
        line-height: 150%;
        text-align: center;
        color: #768284;
        flex: none;
        order: 1;
        flex-grow: 0;
    }

    .btn-browse-more {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 16px 22px;
        gap: 10px;
        width: 100%;
        max-width: 400px;
        height: 53px;
        background: #0B3C40;
        box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
        border-radius: 99px;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        flex: none;
        order: 3;
        align-self: stretch;
        flex-grow: 0;
    }

    .btn-browse-more:hover {
        background: #0D2D36;
        transform: translateY(-2px);
        box-shadow: 0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -2px rgba(0, 0, 0, 0.1);
    }

    .btn-browse-more:active {
        transform: translateY(0);
    }

    .btn-browse-more .btn-text {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 0 2px;
        height: 21px;
        font-family: 'ABeeZee', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 18px;
        line-height: 21px;
        color: #FFFFFF;
        flex: none;
        order: 0;
        flex-grow: 0;
    }

    /* Success Popup Responsive Styles */
    @media (max-width: 576px) {
        .success-popup-container {
            padding: 20px;
            gap: 18px;
            max-width: 100%;
            min-height: auto;
        }

        .success-icon-wrapper {
            width: 80px;
            height: 80px;
        }

        .success-icon-circle {
            width: 40px;
            height: 40px;
        }

        .success-check-icon {
            width: 40px;
            height: 40px;
        }

        .success-title {
            font-size: 22px;
            height: auto;
        }

        .success-details-card {
            padding: 20px;
            gap: 10px;
            min-height: auto;
        }

        .success-detail-row {
            height: auto;
            min-height: 20px;
        }

        .success-detail-value {
            font-size: 16px;
        }

        .success-detail-label {
            font-size: 14px;
        }

        .btn-browse-more {
            height: 50px;
            padding: 14px 20px;
        }

        .btn-browse-more .btn-text {
            font-size: 16px;
        }
    }

    @media (max-width: 768px) {
        .success-popup-container {
            padding: 22px;
            gap: 20px;
        }

        .success-title {
            font-size: 23px;
        }
    }
}
