/**
 * LemonFox Dashboard Styles
 * 
 * @file dashboard.css
 * @description Core styling for LemonFox creator and listener dashboards
 */

/* Remove admin bar and margin gaps */
html {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Force remove all admin elements */
#wpadminbar, 
#adminmenuback,
#adminmenuwrap,
#adminmenu,
.wrap h1,
.wrap h2,
.about-wrap,
.welcome-panel,
.screen-meta-toggle,
.update-nag,
.notice {
    display: none !important;
    visibility: hidden !important;
}

/* Core dashboard layout */
.creator-dashboard-wrapper, 
.listener-dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - 120px);
    background-color: #f8fafc;
    margin-top: 0 !important;
    align-items: flex-start;
}

/* Fix footer positioning */
.dashboard-footer-container {
    margin-top: auto;
    width: 100%;
    clear: both;
}

/* Ensure full page layout */
body.page-template-template-creator-dashboard,
body.page-template-template-listener-dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.page-template-template-creator-dashboard .site-content,
body.page-template-template-listener-dashboard .site-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.creator-dashboard-content,
.listener-dashboard-content {
    flex: 1;
    padding: 0;
    width: 100%;
}

/* Creator Dashboard Sidebar */
.creator-dashboard-sidebar {
    width: 280px;
    flex-shrink: 0;
    padding: 25px 20px;
    background-color: #1a1f36;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    margin-right: 25px;
    height: fit-content;
    position: sticky;
    top: 30px;
    color: white;
}

/* Enhanced Mobile Navigation Improvements */
@media (max-width: 768px) {
    /* Stack dashboard layout vertically */
    .creator-dashboard-wrapper, 
    .listener-dashboard-wrapper {
        flex-direction: column !important;
        padding: 15px !important;
    }
    
    /* Full-width sidebar on mobile */
    .creator-dashboard-sidebar {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 20px !important;
        position: static !important;
        padding: 20px 15px !important;
    }
    
    /* Better mobile sidebar navigation */
    .sidebar-nav a {
        padding: 12px 16px !important;
        border-radius: 6px !important;
        font-size: 16px !important;
        display: flex !important;
        align-items: center !important;
        min-height: 48px !important;
    }
    
    /* Enhanced mobile touch feedback */
    .sidebar-nav a:active {
        transform: scale(0.98);
        background-color: rgba(255, 255, 255, 0.2) !important;
        transition: all 0.1s ease;
    }
    
    /* Better mobile stats display */
    .stats-card {
        padding: 12px !important;
    }
    
    .stat-item {
        margin-bottom: 10px !important;
        padding: 8px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .stat-item:last-child {
        border-bottom: none;
    }
    
    /* Mobile-friendly titles */
    .studio-title {
        font-size: 1.4rem !important;
        margin-bottom: 12px !important;
    }
    
    /* Better mobile content area */
    .creator-dashboard-content,
    .listener-dashboard-content {
        padding: 15px !important;
    }
}

@media (max-width: 480px) {
    /* Compact navigation for very small screens */
    .sidebar-nav a {
        padding: 10px 12px !important;
        font-size: 14px !important;
        min-height: 44px !important;
    }
    
    /* Smaller sidebar sections */
    .sidebar-section {
        margin-bottom: 20px !important;
        padding-bottom: 15px !important;
    }
    
    .sidebar-section h3 {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
    }
    
    /* Compact stats */
    .stat-label,
    .stat-value {
        font-size: 13px !important;
    }
    
    /* Better mobile dashboard wrapper */
    .creator-dashboard-wrapper, 
    .listener-dashboard-wrapper {
        padding: 10px !important;
        min-height: calc(100vh - 80px) !important;
    }
}

.studio-title {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.creator-dashboard-sidebar p {
    color: #b8c5d1;
    margin-bottom: 20px;
}

.studio-icon {
    margin-right: 10px;
    font-size: 24px;
}

.sidebar-section {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 20px;
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
}

.stats-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    color: #b8c5d1;
    font-size: 14px;
}

.stat-value {
    font-weight: 500;
    color: white;
    font-size: 14px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    color: #b8c5d1;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background-color: #4338ca;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

/* Dashboard Welcome */
.dashboard-welcome {
    margin-bottom: 30px;
    text-align: center;
}

.dashboard-welcome h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1f36;
    margin-bottom: 8px;
}

.dashboard-welcome p {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}

/* Role Notification */
.role-notification {
    background: linear-gradient(135deg, #e0f2fe 0%, #f3e5f5 100%);
    border: 1px solid #b3e5fc;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-content {
    display: flex;
    align-items: center;
}

.notification-content .icon {
    font-size: 20px;
    margin-right: 12px;
}

/* Hero Actions */
.hero-actions {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    color: white;
    text-align: center;
}

.hero-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: white;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.action-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 24px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.action-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: white;
}

.action-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.action-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.action-card p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* Stats Overview */
.stats-overview {
    margin-bottom: 40px;
}

.stats-overview h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1f36;
    margin-bottom: 20px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.stat-card.progress {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #1a1f36;
    margin-bottom: 8px;
}

.stat-card.progress .stat-number {
    color: white;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.stat-card.progress .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Recent Projects */
.recent-projects {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1f36;
    margin: 0;
}

.view-all {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.project-info {
    flex: 1;
    margin-left: 12px;
}

.project-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1f36;
    margin: 0 0 4px 0;
}

.project-type {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 500;
}

.continue-btn {
    background: #4f46e5;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.continue-btn:hover {
    background: #4338ca;
    color: white;
}

.project-progress {
    margin-top: 12px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    transition: width 0.3s ease;
}

.last-updated {
    font-size: 12px;
    color: #94a3b8;
}

/* Dashboard Bottom */
.dashboard-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.account-status, .activity-feed {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.account-status h3, .activity-feed h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1f36;
    margin-bottom: 16px;
}

.tier-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.tier-badge.tier-basic {
    background: #dbeafe;
    color: #1d4ed8;
}

.tier-badge.tier-pro {
    background: #dcfce7;
    color: #16a34a;
}

.tier-usage {
    margin-bottom: 16px;
}

.usage-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.usage-label {
    color: #64748b;
}

.usage-value {
    font-weight: 500;
    color: #1a1f36;
}

.activity-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-icon {
    font-size: 16px;
}

.activity-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.activity-text strong {
    font-size: 14px;
    color: #1a1f36;
}

.activity-time {
    font-size: 12px;
    color: #94a3b8;
}

.no-activity {
    color: #94a3b8;
    font-style: italic;
    margin: 0;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    color: #1a1f36;
    margin-bottom: 8px;
}

.empty-state p {
    margin-bottom: 0;
}

/* Button Variants */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-secondary {
    background: #e2e8f0;
    color: #475569;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-upgrade {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.btn-upgrade:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

/* Tier Alert */
.tier-alert {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.alert-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.tier-alert h3 {
    color: #92400e;
    margin-bottom: 12px;
}

.tier-alert p {
    color: #a16207;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-bottom {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-actions {
        padding: 30px 20px;
    }
}
}

.dashboard-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 10px 0;
    color: #0f172a;
}

.dashboard-tagline {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}

/* Card layouts */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-row {
    margin-bottom: 30px;
}

.dashboard-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.card-content {
    padding: 20px;
    min-height: 200px;
}

/* Quick action buttons */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.action-button {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 20px;
    background: #f1f5f9;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.action-button.audiobook {
    background-color: #ede9fe;
    color: #5b21b6;
}

.action-button.audiobook:hover {
    background-color: #ddd6fe;
    border-color: #7c3aed;
    transform: translateY(-3px);
}

.action-button.podcast {
    background-color: #dcfce7;
    color: #166534;
}

.action-button.podcast:hover {
    background-color: #bbf7d0;
    border-color: #16a34a;
    transform: translateY(-3px);
}

.action-button .icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.action-button .text {
    font-weight: 600;
    font-size: 16px;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
}

/* Empty state styling */
.empty-state {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px;
}

.empty-state .icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #0f172a;
}

.empty-state p {
    color: #64748b;
    margin-bottom: 20px;
}

/* Projects styling */
.projects-grid {
    display: grid;
    gap: 15px;
}

.project-item {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    gap: 15px;
}

.project-icon {
    font-size: 24px;
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.project-details {
    flex: 1;
}

.project-details h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.project-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #64748b;
}

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 3px;
}

.project-updated {
    font-size: 13px;
    color: #64748b;
}

.project-button {
    background: #3b82f6;
    color: white;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.project-button:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* Activity list */
.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
    gap: 15px;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    font-size: 20px;
    background: #f1f5f9;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: #0f172a;
}

.activity-info {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 3px;
}

.activity-date {
    font-size: 13px;
    color: #94a3b8;
}

/* Tier info */
.tier-info {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tier-header {
    padding: 15px 20px;
    text-align: center;
    color: white;
}

.tier-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.tier-header.tier-basic {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.tier-header.tier-plus {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.tier-header.tier-pro {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.tier-details {
    padding: 20px;
    background: white;
}

.tier-limits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.limit-item {
    text-align: center;
    padding: 10px;
    background: #f8fafc;
    border-radius: 6px;
}

.limit-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 5px;
}

.limit-value {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

.btn-upgrade {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 12px;
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Role notification */
.role-notification {
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-content .icon {
    font-size: 28px;
}

.notification-content .text h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.notification-content .text p {
    margin: 0;
    color: #0f172a;
}

.switch-mode-btn {
    background-color: #10b981;
    color: white;
}

.switch-mode-btn:hover {
    background-color: #059669;
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Alert styles */
.tier-alert {
    display: flex;
    align-items: center;
    background: #fff9db;
    border: 1px solid #ffd43b;
    border-radius: 8px;
    padding: 20px;
    gap: 20px;
}

.alert-icon {
    font-size: 28px;
}

.alert-content {
    flex: 1;
}

.alert-content h3 {
    font-size: 18px;
    margin: 0 0 5px 0;
}

.alert-content p {
    margin: 0 0 15px 0;
    color: #64748b;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .creator-dashboard-wrapper, 
    .listener-dashboard-wrapper {
        flex-direction: column;
    }
    
    .creator-sidebar, 
    .listener-sidebar {
        width: 100%;
        min-height: auto;
    }
    
    .creator-dashboard-content, 
    .listener-dashboard-content {
        padding: 20px;
    }
    
    .dashboard-cards,
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .role-notification {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .switch-mode-btn {
        width: 100%;
        text-align: center;
    }
}