/* Copper Trace Custom Styles */
/* Theme definitions are now in daisyui-themes.css */

/* Loading indicators */
.htmx-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth transitions for content updates */
.htmx-swapping {
    transition: opacity 150ms ease-out;
    opacity: 0;
}

/* Custom scrollbar for sidebar */
.sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Let DaisyUI handle mobile drawer animations */

/* Focus styles for accessibility */
.focus-visible:focus {
    outline: 2px solid hsl(var(--p));
    outline-offset: 2px;
}

/* Toast animations */
.toast .alert {
    animation: slideInRight 0.3s ease-out;
}

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

/* Custom badge styles */
.badge {
    white-space: nowrap;
}

.badge-status-active {
    @apply badge-success;
}

.badge-status-inactive {
    @apply badge-error;
}

.badge-status-pending {
    @apply badge-warning;
}

/* Responsive tables */
.table-responsive {
    overflow-x: auto;
}

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

/* Form validation styles */
.form-control.is-invalid {
    border-color: hsl(var(--er));
}

.form-control.is-valid {
    border-color: hsl(var(--su));
}

.invalid-feedback {
    color: hsl(var(--er));
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    color: hsl(var(--su));
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Loading skeleton styles */
.skeleton {
    background: linear-gradient(90deg, 
        hsl(var(--b2)) 25%, 
        hsl(var(--b3)) 50%, 
        hsl(var(--b2)) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .navbar,
    .drawer-side,
    .footer {
        display: none !important;
    }
    
    .drawer-content {
        margin: 0 !important;
    }
    
    .main-content {
        padding: 0 !important;
        max-width: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border-width: 2px;
    }
    
    .link {
        text-decoration: underline;
    }
}

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

/* Custom utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Dashboard specific styles */
.dashboard-card {
    @apply card bg-base-100 shadow-sm border border-base-300;
}

.dashboard-stat {
    @apply stat bg-base-100 border border-base-300 rounded-lg;
}

/* Status indicators */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-indicator.active {
    background-color: hsl(var(--su));
}

.status-indicator.inactive {
    background-color: hsl(var(--er));
}

.status-indicator.pending {
    background-color: hsl(var(--wa));
}

/* Custom dropdown styles */
.dropdown-content {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Sidebar brand area */
.sidebar-brand {
    background: linear-gradient(135deg, hsl(var(--p)) 0%, hsl(var(--s)) 100%);
}

/* Navigation active states */
.nav-link.active {
    background-color: hsl(var(--p));
    color: hsl(var(--pc));
}

.nav-link.active svg {
    color: hsl(var(--pc));
}

/* Custom form styles */
.form-floating {
    position: relative;
}

.form-floating > .form-control {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Distillery specific styling */
.distillery-accent {
    background: linear-gradient(135deg, #8B4513 0%, #CD853F 50%, #DEB887 100%);
}

.copper-gradient {
    background: linear-gradient(135deg, #B87333 0%, #CD7F32 50%, #D2691E 100%);
}

/* Custom table styles */
.table-distillery th {
    background-color: hsl(var(--b2));
    border-bottom: 2px solid hsl(var(--b3));
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table-distillery tbody tr:hover {
    background-color: hsl(var(--b2));
}

/* Quality control styles */
.quality-pass {
    @apply text-success;
}

.quality-fail {
    @apply text-error;
}

.quality-pending {
    @apply text-warning;
}

/* Production status styles */
.production-status {
    @apply badge badge-sm;
}

.production-status.fermenting {
    @apply badge-info;
}

.production-status.distilling {
    @apply badge-warning;
}

.production-status.aging {
    @apply badge-accent;
}

.production-status.bottling {
    @apply badge-primary;
}

.production-status.complete {
    @apply badge-success;
}

/* Inventory level indicators */
.inventory-level {
    @apply badge badge-sm;
}

.inventory-level.low {
    @apply badge-error;
}

.inventory-level.medium {
    @apply badge-warning;
}

.inventory-level.high {
    @apply badge-success;
}

.inventory-level.overstock {
    @apply badge-info;
}