/* styles.css - Minimal global styles only */

/* CSS Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

/* Material Icons Font */
@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/materialicons/v143/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
}

/* Global link styles */
a {
    color: inherit;
    text-decoration: none;
}

/* Form reset */
input,
button,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button {
    cursor: pointer;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #1976d2;
    outline-offset: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

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

/* Print styles */
@media print {
    body {
        background-color: white;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dialog styles */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-in-out;
}

.dialog-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}

.dialog-content-small {
    max-width: 400px;
}

.dialog-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.dialog-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    color: #333;
}

.dialog-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.dialog-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.dialog-button {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.dialog-button-cancel {
    background-color: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.dialog-button-cancel:hover {
    background-color: #f5f5f5;
}

.dialog-button-primary {
    background-color: #1976d2;
    color: white;
}

.dialog-button-primary:hover {
    background-color: #1565c0;
}

.dialog-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* In your styles.css */
body.dragging {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body.dragging * {
    cursor: grabbing !important;
}

/* Add to styles.css */
.dialog-button-danger {
    background-color: #d32f2f;
    color: white;
}

.dialog-button-danger:hover {
    background-color: #c62828;
}

/* Snackbar styles */
.snackbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #323232;
    color: white;
    padding: 14px 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2),
                0 6px 10px 0 rgba(0, 0, 0, 0.14),
                0 1px 18px 0 rgba(0, 0, 0, 0.12);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.snackbar-message {
    font-size: 14px;
}

.snackbar-action {
    background: none;
    border: none;
    color: #4fc3f7;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    text-transform: uppercase;
    font-size: 14px;
}

.snackbar-action:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

/* Button styles */
.button {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.button-primary {
    background-color: #1976d2;
    color: white;
}

.button-primary:hover:not(:disabled) {
    background-color: #1565c0;
}

.button-secondary {
    background-color: white;
    color: #1976d2;
    border: 1px solid #1976d2;
}

.button-secondary:hover:not(:disabled) {
    background-color: #e3f2fd;
}

.button-text {
    background-color: transparent;
    color: #1976d2;
}

.button-text:hover:not(:disabled) {
    background-color: rgba(25, 118, 210, 0.04);
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-loading {
    color: transparent;
}

.button-spinner {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.date-picker-input-container {
    width: 100%;
}

.date-picker-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.date-picker-input:focus {
    outline: none;
    border-color: #1976d2;
}

/* Container System */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
        padding-left: 32px;
        padding-right: 32px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* Card Container for constrained width */
.card-container {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Standard card styling - REDUCED VERTICAL SPACING */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 16px; /* Reduced from 24px */
    margin-bottom: 8px; /* Reduced from 16px */
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
    .card {
        padding: 20px; /* Reduced from 32px */
        margin-bottom: 12px; /* Reduced from 24px */
    }
}

/* Page wrapper for consistent spacing - REDUCED TOP/BOTTOM PADDING */
.page-wrapper {
    padding-top: 16px; /* Reduced from 24px */
    padding-bottom: 32px; /* Reduced from 48px */
    min-height: calc(100vh - 56px);
}

@media (min-width: 768px) {
    .page-wrapper {
        padding-top: 20px; /* Reduced from 32px */
        padding-bottom: 40px; /* Reduced from 64px */
    }
}