/* Wonky Dial - Modern Pink Flux Design System */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary: #fb6f92;
    --primary-soft: #ff8fab;
    --secondary: #ffb3c6;
    --soft-blush: #ffe5ec;
    --pastel-pink: #ffc2d1;
    --cherry-blossom: #ffb3c6;
    --cotton-candy: #ff8fab;
    --petal-rouge: #fb6f92;
    --sidebar: #d94f72;
    --sidebar-hover: #fb6f92;
    --background: #ffe5ec;
    --cards: #FFFFFF;
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --text: #1F2937;
    --text-muted: #6B7280;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Gradient text for brand */
.gradient-text {
    background: linear-gradient(135deg, #fb6f92 0%, #ff8fab 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Font Awesome icon spacing - space between icon and text (load after FA, use !important to override) */
.fa-icon,
i.fa-icon,
[class*="fa-"].fa-icon {
    margin-right: 0.5rem !important;
}
.fa-icon:last-child,
i.fa-icon:last-child {
    margin-right: 0 !important;
}

/* Icon after text - add left gap */
.icon-text .fa-icon:last-child:not(:only-child),
.icon-text i.fa-icon:last-child:not(:only-child) {
    margin-left: 0.5rem !important;
}

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

/* Icon + text layout - use on parent for reliable spacing */
.icon-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Auto-apply icon spacing to any element with icon + text (modern browsers) */
h1:has(> .fa-icon),
h2:has(> .fa-icon),
h3:has(> .fa-icon),
h4:has(> .fa-icon),
h5:has(> .fa-icon),
h6:has(> .fa-icon),
a:has(> .fa-icon),
button:has(> .fa-icon),
strong:has(> .fa-icon),
p:has(> .fa-icon),
label:has(> .fa-icon),
span:has(> .fa-icon) {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Alpine.js x-cloak */
[x-cloak] { display: none !important; }

/* Page headers - responsive */
h2 {
    position: relative;
    display: inline-block;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, #fb6f92 0%, #ff8fab 100%);
    border-radius: 2px;
}

/* Modern card style */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(251, 111, 146, 0.12);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 700px;
}

@media (max-width: 640px) {
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem;
    }
}

/* Page header - stacks on mobile */
.page-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .page-header h2 { font-size: 1.25rem; }
}

/* Form inputs - modern */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Button base */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: var(--radius);
}

/* Form actions - stack on mobile */
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 640px) {
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .form-actions a,
    .form-actions button {
        width: 100%;
    }
}

/* Custom warning badge */
.bg-warning-custom {
    background-color: var(--warning) !important;
    color: white !important;
}
