/* assets/css/terms_of_engagement.css */

/* Terms Module Logic */
.terms-section {
    background: rgba(0, 209, 224, 0.02);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(0, 209, 224, 0.1);
    animation: fadeInUp 0.8s ease both;
}

.terms-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.term-item {
    display: flex !important;
    flex-direction: row !important;
    /* Force row layout */
    align-items: flex-start;
    gap: 15px;
    cursor: pointer;
    position: relative;
    user-select: none;
    /* Reset label styles inherited from .form-group label */
    text-transform: none !important;
    margin: 0 !important;
    width: 100%;
}

/* Hide default checkbox */
.term-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom Checkbox Container */
.checkmark {
    position: relative;
    height: 22px;
    width: 22px;
    min-width: 22px;
    /* Prevent flex shrinking */
    flex: 0 0 22px;
    /* Rigid width */
    background-color: rgba(0, 209, 224, 0.05);
    border: 1px solid rgba(0, 209, 224, 0.3);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    /* Visual alignment with text line-height */
}

/* Hover Effect */
.term-item:hover .checkmark {
    background-color: rgba(0, 209, 224, 0.15);
    border-color: var(--teal);
    box-shadow: 0 0 10px rgba(0, 209, 224, 0.2);
}

/* Checked State */
.term-item input:checked~.checkmark {
    background-color: var(--teal);
    border-color: var(--teal);
    box-shadow: 0 0 15px rgba(0, 209, 224, 0.4);
}

/* Checkmark Icon (Hidden by default) */
.checkmark:after {
    content: '';
    display: none;
    width: 6px;
    height: 12px;
    border: solid #001014;
    /* Dark check color */
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-2px);
}

/* Show checkmark when checked */
.term-item input:checked~.checkmark:after {
    display: block;
}

/* Text Styling */
.term-text {
    flex: 1;
    /* Take remaining space */
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
    /* improved readability */
    font-weight: 400 !important;
    /* Reset from bold label */
    letter-spacing: 0.3px;
    transition: color 0.3s;
    margin-top: 0;
}

.term-item:hover .term-text {
    color: #fff;
}

.term-item input:checked~.term-text {
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 209, 224, 0.2);
    font-weight: 500 !important;
    /* Slight bold on selection */
}

/* Animations */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
    .terms-section {
        padding: 16px;
    }

    .terms-list {
        gap: 12px;
    }

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

@media (max-width: 480px) {
    .terms-section {
        padding: 12px;
        border-radius: 8px;
    }

    .term-item {
        gap: 12px;
    }

    /* Ensure checkmark tap target is comfortable */
    .checkmark {
        height: 24px;
        width: 24px;
        min-width: 24px;
        flex: 0 0 24px;
    }

    .term-text {
        font-size: 13px;
        line-height: 1.5;
    }
}