.payment-terms-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(147, 51, 234, 0.2) 0%,
            rgba(168, 85, 247, 0.15) 15%,
            rgba(14, 34, 69, 0.9) 40%);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 999999;
}

.payment-terms-modal.active {
    opacity: 1;
    visibility: visible;
    display: flex;
    pointer-events: auto;
}

.payment-terms-modal.active > .payment-terms-content {
    transform: translateY(0);
    opacity: 1;
}

.payment-terms-modal > .payment-terms-content {
    width: 550px;
    max-width: 95%;
    background: linear-gradient(139deg,
            rgba(38, 35, 78, 0.95),
            rgba(23, 19, 61, 0.98));
    border: 1px solid rgba(147, 51, 234, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 999999;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(126, 34, 206, 0.5) inset;
    max-height: 95vh;
    margin-top: 0;
    padding: 30px 25px 25px;
}

.payment-terms-modal > .payment-terms-content::before,
.payment-terms-modal > .payment-terms-content::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right,
            transparent,
            rgba(147, 51, 234, 0.7),
            rgba(168, 85, 247, 0.8),
            rgba(147, 51, 234, 0.7),
            transparent);
    z-index: 1;
}

.payment-terms-modal > .payment-terms-content::before {
    top: 0;
}

.payment-terms-modal > .payment-terms-content::after {
    bottom: 0;
}

.payment-terms-modal .drawer-handle {
    display: none;
}

.payment-terms-logo {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.payment-terms-logo img {
    max-width: 180px;
}

.payment-terms-title {
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.payment-terms-notice {
    color: rgba(255, 255, 255, 0.65);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 13px;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.6;
    padding: 0 8px;
}

.payment-terms-notice a {
    color: #d8b4fe;
    text-decoration: none;
    border-bottom: 1px solid rgba(192, 132, 252, 0.4);
    transition: all 0.2s ease;
}

.payment-terms-notice a:hover {
    color: #e9d5ff;
    border-bottom-color: #e9d5ff;
}

.payment-terms-services {
    margin-bottom: 20px;
}

.payment-terms-services-title {
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.payment-terms-services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.payment-terms-service-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    flex: 0 0 calc(33.333% - 7px);
    max-width: calc(33.333% - 7px);
    box-sizing: border-box;
}

.payment-terms-service-card img {
    max-width: 100%;
    max-height: 32px;
    height: auto;
    object-fit: contain;
}

.payment-terms-service-card-multi {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.payment-terms-service-card-multi img {
    max-height: 20px;
}

.payment-terms-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

.payment-terms-button {
    position: relative;
    padding: 0 40px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    overflow: hidden;
    z-index: 1;
    height: 40px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-terms-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.payment-terms-button-accept {
    background: #22c55e;
    border: none;
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.payment-terms-button-accept::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 4px;
    background: linear-gradient(90deg, #22c55e, #4ade80, #22c55e);
    background-size: 200% 100%;
}

.payment-terms-button-accept:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
}

.payment-terms-button-accept:hover:not(:disabled)::before {
    opacity: 1;
    animation: payment-terms-shine 2s linear infinite;
}

@keyframes payment-terms-shine {
    to {
        background-position: 200% center;
    }
}

@media screen and (max-width: 768px) {
    .payment-terms-modal {
        align-items: flex-end !important;
        background: rgba(0, 0, 0, 0.5) !important;
        backdrop-filter: blur(8px) !important;
        height: 100dvh !important;
    }

    .payment-terms-modal > .payment-terms-content {
        width: 100% !important;
        max-width: 100% !important;
        transform: translateY(100%);
        opacity: 1 !important;
        border-radius: 20px 20px 0 0 !important;
        border-bottom: none !important;
        max-height: 95dvh !important;
        padding: 8px 20px max(20px, env(safe-area-inset-bottom)) !important;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5) !important;
        transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
    }

    .payment-terms-modal.active > .payment-terms-content {
        transform: translateY(0);
    }

    .payment-terms-modal .drawer-handle {
        display: block;
        position: relative;
        width: 100%;
        height: 24px;
        cursor: grab;
        z-index: 10;
        touch-action: none;
        flex: 0 0 auto;
    }

    .payment-terms-modal .drawer-handle::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 2px;
        transition: background 0.3s ease;
    }

    .payment-terms-modal > .payment-terms-content:active .drawer-handle::before,
    .payment-terms-modal > .payment-terms-content.dragging .drawer-handle::before {
        background: rgba(255, 255, 255, 0.4);
    }

    .payment-terms-modal > .payment-terms-content.dragging .drawer-handle {
        cursor: grabbing !important;
    }

    .payment-terms-title {
        font-size: 20px;
    }

    .payment-terms-notice {
        font-size: 12px;
        margin-bottom: 18px;
    }

    .payment-terms-services-title {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .payment-terms-services-grid {
        flex-wrap: wrap;
        gap: 8px;
    }

    .payment-terms-service-card {
        padding: 10px 6px;
        min-height: 45px;
    }

    .payment-terms-service-card img {
        max-height: 28px;
    }

    .payment-terms-service-card-multi {
        padding: 6px;
        gap: 4px;
    }

    .payment-terms-service-card-multi img {
        max-height: 18px;
    }

    .payment-terms-buttons {
        flex-direction: column;
    }

    .payment-terms-button {
        width: 100%;
    }

    .payment-terms-logo {
        margin-bottom: 14px;
    }

    .payment-terms-logo img {
        max-width: 150px;
    }
}

@media screen and (max-width: 360px) {
    .payment-terms-modal > .payment-terms-content {
        padding: 8px 15px max(16px, env(safe-area-inset-bottom)) !important;
    }

    .payment-terms-title {
        font-size: 18px;
    }

    .payment-terms-notice {
        font-size: 11px;
    }

    .payment-terms-services-title {
        font-size: 12px;
    }

    .payment-terms-services-grid {
        gap: 6px;
    }

    .payment-terms-service-card {
        padding: 8px 4px;
        min-height: 40px;
    }

    .payment-terms-service-card img {
        max-height: 24px;
    }

    .payment-terms-service-card-multi img {
        max-height: 16px;
    }

    .payment-terms-button {
        font-size: 14px;
        padding: 0 30px;
        height: 38px;
    }
}
