/* Emagify Customer Portal — base styles (Tailwind CDN handles utilities) */

:root {
    --brand-teal: #14b8a6;
    --brand-blue: #2563eb;
    --brand-purple: #9333ea;
    --brand-pink: #ec4899;
    --brand-gradient: linear-gradient(
        135deg,
        var(--brand-teal) 0%,
        var(--brand-blue) 45%,
        var(--brand-purple) 75%,
        var(--brand-pink) 100%
    );
}

html {
    /* Compact density: Tailwind's text/padding/gap/icon utilities are rem-based,
     so scaling the root font-size shrinks the whole UI proportionally and consistently. */
    font-size: 14px;
}

html,
body {
    height: 100%;
    background-color: #f8fafc;
}

/* Brand gradient text, used sparingly (logo wordmark accent only) */
.brand-gradient-text {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-gradient-bg {
    background: var(--brand-gradient);
}

/* Thin gradient bar used as a small accent (active sidebar item, card top edge) */
.brand-gradient-bar {
    background: var(--brand-gradient);
}

/* Sidebar transition (mobile open/close overlay only — always expanded on desktop) */
#sidebar {
    transition: transform 0.2s ease;
}

@media (min-width: 1024px) {
    #main-content {
        margin-left: 16rem;
    }
}

@media (max-width: 1023.98px) {
    #sidebar {
        transform: translateX(-100%);
    }
    #sidebar.mobile-open {
        transform: translateX(0);
    }
}

/* Modal */
.modal-backdrop-custom {
    background: rgba(15, 23, 42, 0.55);
}

.modal-panel {
    animation: modal-in 0.15s ease-out;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Custom scrollbar for sidebar / modal body */
.thin-scroll {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.thin-scroll::-webkit-scrollbar {
    width: 4px;
}
.thin-scroll::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 9999px;
}
.thin-scroll::-webkit-scrollbar-track {
    background: transparent;
}

/* Avatar upload placeholder */
.avatar-upload {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 9999px;
    border: 1.5px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #f1f5f9;
}
.avatar-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Customer type toggle (icon button group, replaces emoji <select>) */
[data-type-toggle-option] {
    border-color: #cbd5e1;
    background-color: #fff;
    color: #475569;
    transition: all 0.15s ease;
}
[data-type-toggle-option]:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
}
[data-type-toggle-option].type-toggle-active {
    border-color: var(--brand-blue);
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--brand-blue);
    font-weight: 600;
}

/* Settings page tabs */
[data-tab-target] {
    color: #64748b;
    border-bottom: 2px solid transparent;
}
[data-tab-target].tab-active {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
}

/* intl-tel-input (country code selector) — themed to match app inputs */
.iti {
    display: block;
    width: 100%;
}
.iti__country-container {
    padding-left: 0.625rem;
}
.iti__selected-country {
    border-radius: 0.5rem 0 0 0.5rem;
    background-color: transparent !important;
}
.iti__selected-dial-code {
    margin-left: 0.375rem;
    color: #334155;
    font-size: 0.875rem;
}
.iti__country-list {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    box-shadow:
        0 10px 15px -3px rgba(15, 23, 42, 0.08),
        0 4px 6px -4px rgba(15, 23, 42, 0.08);
    font-size: 0.875rem;
    z-index: 60;
}
.iti__country.iti__highlight {
    background-color: #f1f5f9;
}
.iti__divider {
    border-bottom: 1px solid #e2e8f0;
}
.iti__search-input {
    border-radius: 0.375rem;
    border: 1px solid #cbd5e1;
    font-size: 0.875rem;
}

/* DataTables empty-state row */
#customers-table tbody td.dt-empty,
#entries-table tbody td.dt-empty,
#payments-table tbody td.dt-empty {
    padding: 3rem 1.25rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Flash toast */
.flash-toast {
    animation: toast-in 0.2s ease-out;
}
@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
