:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-soft: rgba(37, 99, 235, 0.1);

    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #616f89;

    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #dbdfe6;

    --border-light: #f0f1f3;
    --white: #ffffff;
}

.hidden {
    display: none !important;
}

/* MODAL OVERLAY */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    background: rgba(17, 19, 24, 0.6);
    backdrop-filter: blur(6px);
}

.modal-overlay.show {
    display: flex;
}

/* CARD */
.modal-card {
    width: 100%;
    max-width: 800px;

    display: flex;
    flex-direction: column;

    background: var(--white);
    border-radius: 12px;
    overflow: hidden;

    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* HEADER */
.modal-header,
.modal-body,
.modal-footer {
    padding: 1.5rem 2rem;
}

.modal-header {
    position: relative;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: start;
}

.close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;

    padding: 4px;
    border: none;
    border-radius: 6px;

    background: transparent;
    color: #9ca3af;

    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: var(--gray-100);
    color: #374151;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    padding-right: 32px;
}

.header-icon {
    font-size: 32px;
    color: var(--primary);
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: #111318;
}

.subtitle {
    margin-top: 2px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.header-description {
    margin-top: 12px;
    font-size: 16px;
    color: var(--text-light);
}

/* BODY */
.modal-body {
    background: #f7f9fc;
}

.terms-container {
    height: 320px;
    overflow-y: auto;

    padding: 6px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
}

/* ACCORDION */
details {
    border-radius: 6px;
    transition: background 0.2s ease, border 0.2s ease;
}

details[open] {
    background: #f9fafb;
    border: 1px solid var(--gray-300);
}

summary {
    list-style: none;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 16px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

summary:hover {
    background: #f9fafb;
}

summary::-webkit-details-marker {
    display: none;
}

.summary-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.number {
    width: 24px;
    height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;

    background: var(--primary-soft);
    color: var(--primary);
}

summary p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #111318;
}

.arrow {
    font-size: 20px;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

details[open] .arrow {
    transform: rotate(180deg);
}

/* CONTENT */
.content {
    padding: 0 16px 16px 52px;
}

.content > p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
}

/* LINK */
.privacy-link {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.privacy-link a {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    font-size: 14px;
    font-weight: 500;

    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.privacy-link a:hover {
    color: var(--primary-dark);
}

.privacy-link span {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.privacy-link a:hover span {
    transform: translateX(2px);
}

/* FOOTER */
.modal-footer {
    border-top: 1px solid var(--border-light);
    background: var(--white);
    display: flex;
    justify-content: flex-end;
}

.primary-btn {
    padding: 10px 32px;
    border: none;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 700;

    background: var(--primary);
    color: #fff;

    cursor: pointer;
    transition: background 0.2s ease;
}

.primary-btn:hover {
    background: var(--primary-dark);
}

/* BOTÃO COMO LINK */
.btn-link-custom {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.btn-link-custom:hover {
    text-decoration: underline;
}