/* ==========================================================================
   Acelle Mail — Base Styles (authenticated pages)
   Resets, typography, utility classes.
   Loaded by layouts/app.blade.php
   ========================================================================== */

@import url('variables.css');

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: var(--text-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    font-size: var(--text-base);
    font-weight: var(--weight-normal);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background-color: var(--color-page-bg);
}

/* ==========================================================================
   Material Symbols Rounded — icon font overrides for refactored UI
   Thin weight (200), inherits font-size, no old transform hacks
   ========================================================================== */

.material-symbols-rounded {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    font-size: inherit;
    line-height: 1;
    vertical-align: middle;
    display: inline-block;
    transform: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: var(--space-2);
    font-weight: var(--weight-semibold);
    color: var(--color-text);
    line-height: var(--leading-tight);
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

p {
    margin-top: 0;
    margin-bottom: var(--space-4);
}

a {
    color: var(--color-teal);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--color-teal-hover);
}

small, .text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-muted { color: var(--color-text-muted) !important; }
.text-disabled { color: var(--color-text-disabled) !important; }
.font-medium { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }

/* ==========================================================================
   Selection
   ========================================================================== */

::selection {
    background-color: var(--color-teal-light);
    color: var(--color-teal-active);
}

/* ==========================================================================
   Scrollbar
   ========================================================================== */

::-webkit-scrollbar { width: var(--space-1-5); height: var(--space-1-5); }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

/* ==========================================================================
   Focus
   ========================================================================== */

:focus-visible {
    outline: var(--space-0-5) solid var(--color-teal);
    outline-offset: var(--space-0-5);
}

/* ==========================================================================
   Utility classes
   ========================================================================== */

.mc-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.mc-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    width: 100%;
}

.mc-page-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
}

.mc-page-subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: var(--space-0-5) 0 0 0;
}

.mc-page-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
    margin-left: auto;
}

.mc-section {
    margin-bottom: var(--space-12);
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sr-only {
    position: absolute;
    width: var(--space-px);
    height: var(--space-px);
    padding: 0;
    margin: calc(var(--space-px) * -1);
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Mobile UX — Page header, content, layout (≤767px)
   ========================================================================== */

@media (max-width: 767px) {
    /* Page header: stack title + actions vertically */
    .mc-page-header {
        flex-wrap: wrap;
        gap: var(--space-2);
    }

    .mc-page-title {
        font-size: var(--text-lg);
        width: 100%;
    }

    .mc-page-actions {
        margin-left: 0;
        width: 100%;
        flex-wrap: wrap;
    }

    /* Full-width buttons on mobile */
    .mc-page-actions .mc-btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }

    /* Section spacing reduced on mobile */
    .mc-section {
        margin-bottom: var(--space-6);
    }
}
