/**
 * TalkTag User Dashboard Styles
 */

/* Dashboard Container */
.talktag-dashboard {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Dashboard Tabs */
.dashboard-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
}

.tab-btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #1e293b;
    background: #f8fafc;
}

.tab-btn.active {
    color: var(--brand-1, #306ac0);
    border-bottom-color: var(--brand-1, #306ac0);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Q&A Item Type Badges */
.item-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.item-type-badge.type-open {
    background: #dbeafe;
    color: #1e40af;
}

.item-type-badge.type-poll {
    background: #fef3c7;
    color: #92400e;
}

.item-type-badge.type-ab {
    background: #ede9fe;
    color: #5b21b6;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 28px;
    color: #1e293b;
}

.dashboard-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.filter-select {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #1e293b;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* No results message */
.no-filter-results {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    display: none;
}

.no-filter-results.visible {
    display: block;
}

/* Tier Banner */
.dashboard-tier-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.dashboard-tier-banner.tier-free {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
}

.dashboard-tier-banner.tier-pro {
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    border: 1px solid #c4b5fd;
}

.dashboard-tier-banner.tier-business {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #6ee7b7;
}

.dashboard-tier-banner.tier-featured {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fcd34d;
}

.tier-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tier-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.tier-free .tier-badge {
    background: #64748b;
    color: white;
}

.tier-pro .tier-badge {
    background: #8b5cf6;
    color: white;
}

.tier-business .tier-badge {
    background: #10b981;
    color: white;
}

.tier-featured .tier-badge {
    background: #f59e0b;
    color: white;
}

.tier-stats {
    color: #64748b;
    font-size: 14px;
}

/* Empty State */
.dashboard-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

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

.dashboard-empty h2 {
    margin: 0 0 8px 0;
    color: #1e293b;
}

.dashboard-empty p {
    color: #64748b;
    margin: 0 0 24px 0;
}

/* Items List */
.dashboard-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Single Item - Card Layout */
.dashboard-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 24px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.dashboard-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dashboard-item.is-expired {
    opacity: 0.7;
    background: #fef2f2;
    border-color: #fecaca;
}

.dashboard-item.is-expiring {
    background: #fffbeb;
    border-color: #fcd34d;
}

/* Item Main */
.item-main {
    flex: 1;
    min-width: 0;
}

.item-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.item-title a {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    word-break: break-word;
}

.item-title a:hover {
    color: #3b82f6;
}

.item-tier-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.item-tier-badge.tier-free {
    background: #e2e8f0;
    color: #64748b;
}

.item-tier-badge.tier-pro {
    background: #ede9fe;
    color: #7c3aed;
}

.item-tier-badge.tier-business {
    background: #d1fae5;
    color: #059669;
}

.item-tier-badge.tier-featured {
    background: #fef3c7;
    color: #d97706;
}

.item-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.item-status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.item-status-badge.draft {
    background: #e2e8f0;
    color: #64748b;
}

.item-url {
    font-size: 13px;
    color: #64748b;
    word-break: break-all;
}

.item-serp-features {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
}

/* Stats Row */
.item-bottom-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

/* Item Stats */
.item-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    min-width: 50px;
}

.stat-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: #94a3b8;
}

/* Item Meta */
.item-meta {
    min-width: 140px;
}

.item-expiry {
    font-size: 12px;
    color: #64748b;
}

.item-expiry.expired {
    color: #dc2626;
    font-weight: 600;
}

.item-expiry.expiring {
    color: #d97706;
    font-weight: 600;
}

.item-permanent {
    font-size: 12px;
    color: #10b981;
    font-weight: 500;
}

/* Item Actions */
.item-actions {
    display: flex;
    gap: 8px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

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

.btn-outline {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.btn-danger:hover {
    background: #fecaca;
}

/* API Info */
.dashboard-api-info {
    margin-top: 40px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
}

.dashboard-api-info summary {
    cursor: pointer;
    font-weight: 600;
    color: #475569;
}

.dashboard-api-info code {
    display: block;
    margin: 12px 0;
    padding: 12px 16px;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    overflow-x: auto;
}

.dashboard-api-info .api-note {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* Login Prompt */
.talktag-dashboard-login {
    text-align: center;
    padding: 80px 20px;
    max-width: 400px;
    margin: 0 auto;
}

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

.talktag-dashboard-login h2 {
    margin: 0 0 8px 0;
    color: #1e293b;
}

.talktag-dashboard-login p {
    color: #64748b;
    margin: 0 0 24px 0;
}

.login-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .item-bottom-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .item-meta {
        width: 100%;
    }
    
    .item-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .dashboard-tier-banner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .tier-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .item-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .item-actions {
        flex-wrap: wrap;
    }
    
    .login-buttons {
        flex-direction: column;
    }
}

/* ============================================
   PHOSPHOR ICON COLORS (Findborg Brand Tokens)
   ============================================ */

/* Tab button icons - inherit text color, brand-1 blue when active */
.tab-btn .ph-bold {
    font-size: 16px;
    vertical-align: -1px;
    margin-right: 4px;
}
.tab-btn.active .ph-bold {
    color: var(--brand-1, #306ac0);
}

/* Section heading icons - brand-1 blue */
.dashboard-header h1 .ph-bold {
    color: var(--brand-1, #306ac0);
    margin-right: 6px;
}

/* Stat label icons - contextual brand colors */
.stat-label .ph-bold.ph-eye {
    color: var(--brand-1, #306ac0);
}
.stat-label .ph-bold.ph-cursor-click {
    color: var(--brand-3, #ff6311);
}
.stat-label .ph-bold.ph-thumbs-up {
    color: var(--brand-2, #009105);
}
.stat-label .ph-bold.ph-thumbs-down {
    color: var(--brand-4, #b91412);
}

/* Expiry/status icons - contextual colors */
.item-expiry .ph-bold.ph-warning {
    color: var(--brand-4, #b91412);
}
.item-expiry.expiring .ph-bold.ph-clock {
    color: var(--brand-3, #ff6311);
}
.item-expiry .ph-bold.ph-clock {
    color: var(--neutral-500, #6b7280);
}
.item-permanent .ph-bold.ph-check-circle {
    color: var(--brand-2, #009105);
}

/* Type badge icons - inherit badge text color */
.item-type-badge .ph-bold {
    margin-right: 2px;
    vertical-align: -1px;
}

/* Empty state icons - large, brand-1 blue with subtle opacity */
.empty-icon .ph-bold {
    font-size: 48px;
    color: var(--brand-1, #306ac0);
    opacity: 0.6;
}

/* Login icon - brand-1 blue */
.login-icon .ph-bold {
    font-size: 48px;
    color: var(--brand-1, #306ac0);
    opacity: 0.7;
}

/* Upgrade button arrow - orange CTA */
.btn-outline .ph-bold.ph-arrow-right {
    color: var(--brand-3, #ff6311);
    transition: transform 0.2s;
}
.btn-outline:hover .ph-bold.ph-arrow-right {
    transform: translateX(3px);
}

/* API access toggle icon */
summary .ph-bold.ph-plug {
    color: var(--brand-1, #306ac0);
    margin-right: 4px;
}

/* QA status icons */
.item-status .ph-bold.ph-check-circle {
    color: var(--brand-2, #009105);
}
.item-status .ph-bold.ph-hourglass {
    color: var(--brand-3, #ff6311);
}
