/* Custom styles for PeanechCodes */

/* Test custom style */
.test-custom-style {
    color: red !important;
}

/* Note: Button and card styles with @apply moved to src/input.css */
/* They must be compiled by Tailwind build process */

/* Admin Layout Custom CSS - Scoped to admin pages only */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #f8fafc;
    --sidebar-width: 260px;
    --header-height: 64px;
}

/* Only apply to admin pages - remove global reset */
/* body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: #334155;
    overflow-x: hidden;
} */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* Sidebar styles */
.sidebar {
    position: relative;
    width: var(--sidebar-width);
    background-color: white;
    border-right: 1px solid #e2e8f0;
    z-index: 30;
    transform: translateX(0);
    transition: transform 0.3s ease-in-out;
}

.sidebar-transition {
    transition: transform 0.3s ease-in-out;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 50;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 40;
    }

    .overlay.active {
        display: block;
    }
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Table styling */
.table-row-hover:hover {
    background-color: #f8fafc;
}

/* Admin table text color and selection (scoped)
   - keep table cells using clear gray text
   - selection background/color optimized for readability */
.admin-layout table th,
.admin-layout table td {
    color: #111827;
    /* text-gray-900 */
}

.admin-layout ::selection {
    background: rgba(79, 70, 229, 0.95);
    /* indigo-600 */
    color: #ffffff;
}

/* Ensure focused buttons do not change parent text color unexpectedly */
.admin-layout button:focus,
.admin-layout a:focus,
.admin-layout select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    color: inherit;
}

/* Improve table row hover for clarity */
.admin-layout table tr:hover td {
    background-color: #f8fafc;
    /* light gray */
}


/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Slide in animation */
.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card hover effect */
.card-hover {
    transition: all 0.2s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}