/* Terms and Conditions Page Styles */

/* Container styling */
.terms-content .terms-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* Scrollable terms area */
.terms-content .terms-scrollable {
    background: #fff;
    border: 1px solid #e0ebe9;
    border-radius: 12px;
    padding: 40px;
    max-height: 600px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Custom scrollbar for terms area */
.terms-content .terms-scrollable::-webkit-scrollbar {
    width: 8px;
}

.terms-content .terms-scrollable::-webkit-scrollbar-track {
    background: #f1f5f3;
    border-radius: 4px;
}

.terms-content .terms-scrollable::-webkit-scrollbar-thumb {
    background: #016747;
    border-radius: 4px;
}

.terms-content .terms-scrollable::-webkit-scrollbar-thumb:hover {
    background: #014a35;
}

/* Terms headings */
.terms-content h2 {
    color: #016747;
    font-size: 2em;
    font-weight: 700;
    margin: 0 0 15px;
    letter-spacing: 0.5px;
}

.terms-content h3 {
    color: #016747;
    font-size: 1.4em;
    font-weight: 600;
    margin: 35px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f0ed;
}

.terms-content h2 + h3 {
    margin-top: 20px;
}

/* Intro paragraph */
.terms-content .terms-intro {
    font-size: 1.1em;
    font-weight: 500;
    color: #444;
    font-style: italic;
    margin-bottom: 25px;
}

/* Paragraphs */
.terms-content p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #444;
}

/* Lists */
.terms-content ul {
    list-style: none;
    padding-left: 0;
    margin: 15px 0 25px;
}

.terms-content ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    line-height: 1.6;
    color: #444;
}

.terms-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 8px;
    height: 8px;
    background: #016747;
    border-radius: 50%;
}

/* Separator */
.terms-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, #016747, transparent);
    margin: 30px 0;
    opacity: 0.4;
}

/* Strong text */
.terms-content strong {
    color: #016747;
    font-weight: 600;
}

/* Acceptance section */
.terms-acceptance {
    margin-top: 40px;
    padding: 30px;
    background: #f7faf9;
    border-radius: 12px;
    border: 2px solid #e0ebe9;
    text-align: center;
}

/* Checkbox label */
.terms-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    cursor: pointer;
    margin-bottom: 25px;
    user-select: none;
}

/* Hide default checkbox */
.terms-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom checkbox */
.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #016747;
    border-radius: 5px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Checkbox checked state */
.terms-checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom {
    background: #016747;
}

/* Checkmark */
.checkbox-custom::after {
    content: '';
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

.terms-checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

/* Checkbox text */
.terms-checkbox-text {
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
}

/* Continue button wrapper */
.terms-continue-wrapper {
    margin-top: 20px;
}

/* Continue button */
.terms-continue-btn {
    display: inline-block;
    background: #016747;
    color: #fff;
    padding: 16px 40px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1em;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(1, 103, 71, 0.3);
    cursor: pointer;
    border: none;
}

.terms-continue-btn:not([disabled]):not(.disabled) {
    color: #fff;
}

.terms-continue-btn:not([disabled]):not(.disabled):hover,
#terms-continue-btn:not([disabled]):not(.disabled):hover {
    background: #014a35;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 103, 71, 0.4);
}

/* Disabled state */
.terms-continue-btn[disabled],
.terms-continue-btn:disabled,
.terms-continue-btn.disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

.terms-continue-btn.disabled:hover,
.terms-continue-btn:disabled:hover {
    background: #ccc;
    color: #888;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

/* Disabled click message */
.terms-disabled-message {
    color: #c0392b;
    font-size: 0.95em;
    font-weight: 500;
    margin-top: 12px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.terms-disabled-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Shake animation for disabled button click */
@keyframes btn-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

.terms-checkbox-label.shake {
    animation: checkbox-shake 0.5s ease;
}

@keyframes checkbox-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .terms-content .terms-container {
        padding: 0 15px 40px;
    }

    .terms-content .terms-scrollable {
        padding: 25px;
        max-height: 500px;
    }

    .terms-content h2 {
        font-size: 1.6em;
    }

    .terms-content h3 {
        font-size: 1.2em;
    }

    .terms-acceptance {
        padding: 25px 20px;
    }

    .terms-checkbox-label {
        flex-direction: column;
        gap: 10px;
    }

    .terms-checkbox-text {
        font-size: 1em;
        text-align: center;
    }

    .terms-continue-btn {
        padding: 14px 30px;
        font-size: 1em;
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .terms-content .terms-scrollable {
        padding: 20px;
        max-height: 400px;
    }

    .terms-content h2 {
        font-size: 1.4em;
    }

    .terms-content h3 {
        font-size: 1.1em;
        margin-top: 25px;
    }

    .terms-content ul li {
        padding-left: 22px;
    }

    .terms-content ul li::before {
        width: 6px;
        height: 6px;
        top: 8px;
    }
}
