﻿:root {
    --terms-termsPopup: linear-gradient(270deg, rgba(0, 24, 76, 0.4) 0%, rgba(0, 28, 156, 0.4) 100%);
    --terms-termsPopup-border: #003D7B;

    --terms-termsText-bg: linear-gradient(270deg, rgba(0, 24, 76, 0.4) 0%, rgba(0, 28, 156, 0.4) 100%);
    --terms-termsText-color: #e0e0e0;
    --terms-termsText-border: #003D7B;
    --terms-termsText-scroll-track: #20338A;
    --terms-termsText-scroll-thumb: #6280EB;

    --terms-agreeButton-bg: #6280EB;
    --terms-agreeButton-color: #fff;
    --terms-agreeButton-bg-disabled: #555;
    --terms-agreeButton-color-disabled: #ccc;

    --terms-close-btn-color: #aaa;
    --terms-close-btn-hover: #6280EB;

    --terms-card-bg: transparent;
    --terms-card-border: #003D7B;
    --terms-card-text: #f0f0f0;

    --terms-headering-color: #f0f0f0;
}

/* стилі для попапу умов користування */
#termsPopupOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1055;
}

#termsPopup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 93vh;
    background: var(--terms-termsPopup);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4.8px);
    -webkit-backdrop-filter: blur(4.8px);
    color: var(--terms-termsText-color);
    z-index: 1060;
    padding: 32px;
    padding-top: 0px;
    padding-bottom: 32px;
    /*    box-shadow: 0 0 25px rgba(0, 0, 0, 0.7);*/
    border-radius: 12px;
    overflow: hidden;
    border-style: solid;
    border-width: 1px;
    border-color: var(--terms-termsPopup-border);
    transition: box-shadow 0.4s ease;
}

    #termsPopup:hover {
        /*    box-shadow: 0 0 30px rgba(255, 138, 0, 0.25);*/
    }


#termsText {
    display: flex;
    flex-direction: column;
    max-height: calc(80vh - 120px);
    height: 58vh;
    overflow-y: auto;
    border: 1px solid #444;
    padding: 20px;
    color: var(--terms-termsText-color);
    background: var(--terms-termsText-bg);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4.8px);
    -webkit-backdrop-filter: blur(4.8px);
    border-radius: 8px;
    margin-bottom: 20px;
    flex-grow: 1;
    border-style: solid;
    border-width: 1px;
    border-color: var(--terms-termsText-border);
    border-radius: 24px;
    gap: 20px;
    padding-right: 38px; /* додає простір під скрол */
    box-sizing: content-box;
}


    #termsText::-webkit-scrollbar {
        width: 6px;
    }

    #termsText::-webkit-scrollbar-track {
        background: var(--terms-termsText-scroll-track);
    }

    #termsText::-webkit-scrollbar-thumb {
        background: var(--terms-termsText-scroll-thumb);
        height: 100px;
    }

        #termsText::-webkit-scrollbar-thumb:hover {
            /*        background: #777;*/
        }


/*#termsText h5 {
    color: #FF8A00;
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 1.2em; 
}

#termsText p {
    line-height: 1.6; 
    margin-bottom: 10px;

}
*/
#agreeButton {
    margin-top: 15px;
    padding: 12px 25px;
    background-color: var(--terms-agreeButton-bg);
    color: var(--terms-agreeButton-color);
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: block;
    width: 100%;
    height: 6vh;
    margin-bottom: 3.56vh;
}

    #agreeButton:hover {
        background-color: #6280EB;
        transform: translateY(-2px);
    }

    #agreeButton:disabled {
        background-color: var(--terms-agreeButton-bg-disabled);
        cursor: not-allowed;
        opacity: 0.7;
        transform: none;
    }

.close-popup-btn {
    position: absolute;
    /*top: -10px;*/

    right: 20px;
    font-size: 35px;
    color: var(--terms-close-btn-color);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1061;
}

    .close-popup-btn:hover {
        color: var(--terms-close-btn-hover);
    }

.modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

    .modal-header img {
        width: auto;
        height: 4vh;
    }

.modal-head-text {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 32px;
    line-height: 140%;
    letter-spacing: 0;
}

.terms-card {
    width: 100%;
    height: 300px;
    border-style: solid;
    border-width: 1px;
    border-color: var(--terms-card-border);
    border-radius: 12px;
    padding: 32px;
}

.line {
    background-color: #6280EB;
    height: 1px;
    width: 100%;
}

.terms-card-headering {
    margin-top: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 140%;
    letter-spacing: 0;
}

#termsText.dragging {
    cursor: grabbing;
    user-select: none; /* забороняє виділення тексту під час drag */
}

.terms-card-headering,
.modal-head-text {
    color: var(--terms-headering-color);
}

@media (max-width: 768px) {

    .modal-head-text {
        font-size: 20px;
    }

    #termsPopup {
        width: 100%;
        padding: 10px;
        height: auto;
    }

    #termsText {
        padding: 10px;
    }

    .terms-card {
        height: auto;
        padding: 5px;
    }

    .terms-card-headering {
        font-size: 16px;
    }


    #termsText {
        max-height: calc(80vh - 100px);
    }

    #agreeButton {
        width: 100%;
        align-self: stretch;
    }

    .close-popup-btn {
        top: -5px;
        right: 8px;
        font-size: 24px;
    }
}
