body.fo-terms-modal-active {
    overflow: hidden;
}

.fo-terms-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fo-terms-modal-container {
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.fo-terms-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.fo-terms-modal-title {
    margin: 0;
    font-size: var(--fs-block);
    font-weight: var(--fw-bold);
    color: #1d2430;
}

.fo-terms-modal-desc {
    margin: 8px 0 0;
    font-size: var(--fs-tiny);
    color: #667085;
}

.fo-terms-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.fo-terms-modal-all-check {
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    background: #f7f8fa;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.fo-terms-modal-all-check label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    line-height: 1.4;
    cursor: pointer;
}

.fo-terms-modal-term-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fo-terms-modal-term-card {
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.fo-terms-modal-term-head {
    padding: 14px 16px;
    border-bottom: 1px solid #efefef;
    background: #f9fafb;
}

.fo-terms-modal-term-head label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    line-height: 1.4;
    cursor: pointer;
}

.fo-terms-modal-term-name {
    font-size: var(--fs-small);
}

.fo-terms-modal-term-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 24px;
    border-radius: 12px;
    font-size: var(--fs-tiny);
    font-weight: var(--fw-bold);
    color: #305f9f;
    background: #eaf3ff;
}

.fo-terms-modal-term-badge.is-mandatory {
    color: #ad2a2a;
    background: #ffe9e9;
}

.fo-terms-modal-term-body {
    max-height: 200px;
    overflow-y: auto;
    padding: 16px;
    font-size: var(--fs-tiny);
    line-height: 1.7;
}

.fo-terms-modal-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.fo-terms-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    height: 46px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    cursor: pointer;
    box-sizing: border-box;
}

.fo-terms-modal-btn.is-primary {
    color: #ffffff;
    background: #0f4fa8;
}

.fo-terms-modal-btn.is-primary:disabled {
    background: #b0c4de;
    cursor: not-allowed;
}

.fo-terms-modal-btn.is-secondary {
    color: #1f2b3b;
    background: #f1f3f6;
    border-color: #d2d8e0;
}

.fo-terms-modal-loading {
    text-align: center;
    padding: 40px 20px;
    color: #667085;
    font-size: var(--fs-tiny);
}

.fo-terms-modal-error {
    text-align: center;
    padding: 40px 20px;
    color: #cf2633;
    font-size: var(--fs-tiny);
}

@media (max-width: 640px) {
    .fo-terms-modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .fo-terms-modal-header {
        padding: 18px 16px 14px;
    }

    .fo-terms-modal-body {
        padding: 16px;
    }

    .fo-terms-modal-footer {
        padding: 14px 16px 18px;
        flex-direction: column;
    }

    .fo-terms-modal-btn {
        width: 100%;
    }
}
