/**
 * Main CSS - Extra styling bovenop Tailwind
 * 
 * @package SubCounters
 * @file subcounters-theme/assets/css/main.css
 */

/* ==========================================================================
   Dashboard Tab Transitions
   ========================================================================== */

.tab-content {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Form Enhancements
   ========================================================================== */

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

/* ==========================================================================
   Button Hover Effects
   ========================================================================== */

.btn-primary {
    background: linear-gradient(135deg, #9333ea, #ec4899);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(147, 51, 234, 0.3);
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.spinner {
    border: 3px solid rgba(147, 51, 234, 0.1);
    border-top-color: #9333ea;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.6s linear infinite;
}

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

/* ==========================================================================
   Card Hover Effects
   ========================================================================== */

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   WordPress Admin Bar Compatibility
   ========================================================================== */

body.admin-bar .site-header.fixed {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header.fixed {
        top: 46px;
    }
}

/* ==========================================================================
   Responsive Image Handling
   ========================================================================== */

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .no-print,
    header,
    footer,
    .dashboard-header,
    .dashboard-footer {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-gradient {
    background: linear-gradient(135deg, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ==========================================================================
   Custom Scrollbar (Webkit only)
   ========================================================================== */

.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #9333ea;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #7e22ce;
}

/* ==========================================================================
   WordPress Block Editor Compatibility
   ========================================================================== */

.wp-block {
    max-width: 720px;
}

.alignwide {
    max-width: 1200px;
}

.alignfull {
    max-width: 100%;
}

/* ==========================================================================
   Dashboard Specific Styles
   ========================================================================== */

.dashboard-page .site-main {
    min-height: calc(100vh - 200px);
}

.dashboard-stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dashboard-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Notification Badges
   ========================================================================== */

.notification-badge {
    position: relative;
}

.notification-badge::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

/* ==========================================================================
   Mobile Optimizations
   ========================================================================== */

@media (max-width: 640px) {
    .counters-grid {
        padding: 0.5rem;
    }
    
    .counter-item {
        padding: 1rem;
    }
}
