/**
 * MakersGST Website - Custom Styles
 * Supplementing Tailwind CSS
 */

/* ==================== */
/* Root Variables */
/* ==================== */
:root {
    --color-primary: #680000;
    --color-primary-dark: #4A0000;
    --color-secondary: #28211F;
    --color-bg-page: #FBFAF9;
}

/* ==================== */
/* Global Styles */
/* ==================== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
}

/* ==================== */
/* Animations */
/* ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

/* ==================== */
/* Form Enhancements */
/* ==================== */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #B8A88A;
    opacity: 1;
}

/* Remove number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #4A0000;
}

/* ==================== */
/* Loading Spinner */
/* ==================== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ==================== */
/* Gradient Text */
/* ==================== */
.gradient-text {
    background: linear-gradient(135deg, #680000, #4A0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== */
/* Selection Color */
/* ==================== */
::selection {
    background-color: #680000;
    color: #FBFAF9;
}

::-moz-selection {
    background-color: #680000;
    color: #FBFAF9;
}

/* ==================== */
/* Print Styles */
/* ==================== */
@media print {
    header,
    footer,
    .no-print {
        display: none !important;
    }
}

/* ==================== */
/* Mobile Optimizations */
/* ==================== */
@media (max-width: 768px) {
    /* Improve touch targets */
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }

    /* Prevent text size adjustment on mobile */
    html {
        -webkit-text-size-adjust: 100%;
    }
}

/* ==================== */
/* Focus Visible (Accessibility) */
/* ==================== */
*:focus-visible {
    outline: 2px solid #680000;
    outline-offset: 2px;
}

/* ==================== */
/* Loading State */
/* ==================== */
.loading-shimmer {
    background: linear-gradient(
        90deg,
        #F1EEED 0%,
        #E3DEDC 50%,
        #F1EEED 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ==================== */
/* Utility Classes */
/* ==================== */
.text-balance {
    text-wrap: balance;
}

.container-narrow {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== */
/* Hover Effects */
/* ==================== */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(46, 31, 14, 0.1);
}

/* ==================== */
/* Image Lazy Loading Placeholder */
/* ==================== */
img[loading="lazy"] {
    background: linear-gradient(90deg, #F1EEED 25%, #E3DEDC 50%, #F1EEED 75%);
    background-size: 200% 100%;
}

/* ==================== */
/* Status Badges */
/* ==================== */
.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-new {
    background-color: #E6F0F6;
    color: #2E6B8A;
}

.status-contacted {
    background-color: #FDF5E0;
    color: #680000;
}

.status-converted {
    background-color: #EEF6E8;
    color: #5C7A3D;
}

.status-closed {
    background-color: #E3DEDC;
    color: #766D6B;
}

/* ==================== */
/* Admin Table Styles */
/* ==================== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background-color: #F9F6F0;
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #5A504D;
    border-bottom: 2px solid #E3DEDC;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #F0EBE1;
    font-size: 14px;
    color: #28211F;
}

.admin-table tr:hover {
    background-color: #FDFBF7;
}

/* ==================== */
/* Toast Notifications */
/* ==================== */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    min-width: 300px;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    background-color: #EEF6E8;
    border-left: 4px solid #5C7A3D;
    color: #28211F;
}

.toast-error {
    background-color: #FDECEA;
    border-left: 4px solid #B85C38;
    color: #28211F;
}

/* ==================== */
/* Dark Mode (Future Enhancement) */
/* ==================== */
/* @media (prefers-color-scheme: dark) {
    :root {
        --color-bg-page: #1a1410;
        --color-secondary: #FBFAF9;
    }
} */
