/* SpeakFlow base styles */
:root {
    --sf-blue: #1d4ed8;
    --sf-red: #dc2626;
    --sf-white: #ffffff;
}

body {
    font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

a,
button {
    transition: all 0.2s ease;
}

a,
button,
input,
select,
textarea {
    max-width: 100%;
}

main {
    min-width: 0;
}

img,
video,
iframe {
    max-width: 100%;
}

[data-sidebar] {
    max-width: min(18rem, calc(100vw - 2rem));
    overflow-y: auto;
}

.sf-sidebar-brand {
    min-width: 0;
}

.sf-sidebar-logo,
.sf-mobile-logo,
.sf-auth-mobile-logo {
    display: block;
    flex: 0 1 auto;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(29, 78, 216, 0.35);
    outline-offset: 2px;
}

.sf-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sf-table-scroll > table {
    width: 100%;
}

.sf-actions,
.sf-form-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sf-actions > *,
.sf-form-actions > * {
    flex: 0 0 auto;
}

.sf-actions a,
.sf-actions button,
.sf-form-actions a,
.sf-form-actions button {
    min-height: 2.5rem;
}

.sf-break {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.sf-whatsapp-float {
    align-items: center;
    background: #16a34a;
    border-radius: 9999px;
    bottom: 1.5rem;
    box-shadow: 0 18px 36px -18px rgba(22, 163, 74, 0.8);
    color: #ffffff;
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 700;
    gap: 0.5rem;
    min-height: 3.25rem;
    padding: 0.875rem 1rem;
    position: fixed;
    right: 1.5rem;
    text-decoration: none;
    z-index: 60;
}

.sf-whatsapp-float:hover {
    background: #15803d;
    transform: translateY(-1px);
}

.sf-whatsapp-float svg {
    flex: 0 0 auto;
    height: 1.25rem;
    width: 1.25rem;
}

.sf-whatsapp-text {
    display: grid;
    gap: 0.05rem;
    line-height: 1.05;
}

.sf-whatsapp-text small {
    font-size: 0.68rem;
    font-weight: 400;
    opacity: 0.9;
}

.sf-whatsapp-text strong {
    font-size: 0.875rem;
    font-weight: 800;
}

@media (max-width: 767px) {
    .mobile-card-table {
        border-collapse: separate;
        border-spacing: 0;
        display: block;
        min-width: 0 !important;
        width: 100%;
    }

    .mobile-card-table thead {
        display: none;
    }

    .mobile-card-table tbody {
        display: grid;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .mobile-card-table tr {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 1rem;
        display: grid;
        gap: 0.65rem;
        padding: 1rem;
    }

    .mobile-card-table td {
        border: 0;
        display: grid;
        gap: 0.25rem;
        min-width: 0;
        padding: 0 !important;
        white-space: normal !important;
    }

    .mobile-card-table td::before {
        color: #64748b;
        content: attr(data-label);
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        line-height: 1;
        text-transform: uppercase;
    }

    .mobile-card-table td[data-label=""],
    .mobile-card-table td[colspan] {
        display: block;
        text-align: center;
    }

    .mobile-card-table td[data-label=""]::before,
    .mobile-card-table td[colspan]::before {
        content: none;
    }

    .mobile-card-table .sf-actions,
    .mobile-card-table td:last-child > div {
        display: grid;
        gap: 0.5rem;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .mobile-card-table form,
    .mobile-card-table a,
    .mobile-card-table button {
        width: 100%;
    }

    .mobile-card-table a,
    .mobile-card-table button {
        align-items: center;
        display: inline-flex;
        justify-content: center;
        min-height: 2.75rem;
        text-align: center;
    }

    .sf-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .sf-form-actions > *,
    .sf-form-actions a,
    .sf-form-actions button {
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .sf-table-scroll {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
        padding-bottom: 0.25rem;
    }

    .sf-table-scroll table:not(.mobile-card-table) {
        min-width: 42rem;
    }

    .sf-whatsapp-float {
        bottom: 1rem;
        min-height: 3rem;
        padding: 0.75rem;
        right: 1rem;
    }

    .sf-whatsapp-text {
        display: none;
    }

    .sf-sidebar-brand {
        justify-content: center;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .sf-sidebar-logo {
        height: 2.75rem;
        max-width: 13rem;
    }

    .sf-mobile-logo {
        max-height: 2.25rem;
        max-width: min(8.25rem, 34vw);
    }

    .sf-auth-mobile-logo {
        max-height: 3.5rem;
        max-width: min(13.75rem, 70vw);
    }
}
