/**
 * TherapieConnect - Theme-Compatible Styles
 * Professional, modern, and accessible CSS
 * 
 * @package TherapieConnect
 * @version 1.0.0
 * @author TherapieConnect GmbH
 */

/* ===================================
   CSS VARIABLES (CUSTOMIZABLE)
   =================================== */
:root {
    /* Primary Colors */
    --tc-primary: #667eea;
    --tc-primary-dark: #5568d3;
    --tc-primary-light: #8b9ef7;
    
    /* Secondary Colors */
    --tc-secondary: #764ba2;
    --tc-accent: #f093fb;
    
    /* Semantic Colors */
    --tc-success: #27ae60;
    --tc-success-light: #d4edda;
    --tc-warning: #f39c12;
    --tc-warning-light: #fff3cd;
    --tc-danger: #e74c3c;
    --tc-danger-light: #fee;
    --tc-info: #3498db;
    --tc-info-light: #d1ecf1;
    
    /* Neutral Colors */
    --tc-white: #ffffff;
    --tc-gray-50: #f8f9fa;
    --tc-gray-100: #f4f7fa;
    --tc-gray-200: #e9ecef;
    --tc-gray-300: #dee2e6;
    --tc-gray-400: #ced4da;
    --tc-gray-500: #adb5bd;
    --tc-gray-600: #6c757d;
    --tc-gray-700: #495057;
    --tc-gray-800: #343a40;
    --tc-gray-900: #212529;
    --tc-black: #000000;
    
    /* Typography */
    --tc-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --tc-font-family-heading: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Spacing */
    --tc-spacing-xs: 0.25rem;
    --tc-spacing-sm: 0.5rem;
    --tc-spacing-md: 1rem;
    --tc-spacing-lg: 1.5rem;
    --tc-spacing-xl: 2rem;
    --tc-spacing-2xl: 3rem;
    --tc-spacing-3xl: 4rem;
    
    /* Border Radius */
    --tc-radius-sm: 4px;
    --tc-radius-md: 6px;
    --tc-radius-lg: 8px;
    --tc-radius-xl: 12px;
    --tc-radius-2xl: 16px;
    --tc-radius-full: 9999px;
    
    /* Shadows */
    --tc-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --tc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --tc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --tc-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --tc-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --tc-transition-fast: 150ms ease-in-out;
    --tc-transition-base: 200ms ease-in-out;
    --tc-transition-slow: 300ms ease-in-out;
    
    /* Z-Index */
    --tc-z-dropdown: 1000;
    --tc-z-sticky: 1020;
    --tc-z-fixed: 1030;
    --tc-z-modal-backdrop: 1040;
    --tc-z-modal: 1050;
    --tc-z-popover: 1060;
    --tc-z-tooltip: 1070;
}

/* ===================================
   BASE RESET & TYPOGRAPHY
   =================================== */
.tc-container,
.tc-container * {
    box-sizing: border-box;
}

.tc-container {
    font-family: var(--tc-font-family);
    color: var(--tc-gray-800);
    line-height: 1.6;
}

/* ===================================
   ADMIN DASHBOARD STYLES
   =================================== */

/* Dashboard Title */
.tc-dashboard-title {
    display: flex;
    align-items: center;
    gap: var(--tc-spacing-md);
    font-size: 28px;
    font-weight: 700;
    color: var(--tc-gray-900);
    margin-bottom: var(--tc-spacing-2xl);
    padding-bottom: var(--tc-spacing-lg);
    border-bottom: 2px solid var(--tc-gray-200);
}

.tc-dashboard-title .dashicons {
    font-size: 32px;
    color: var(--tc-primary);
}

/* Statistics Grid */
.tc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--tc-spacing-lg);
    margin-bottom: var(--tc-spacing-2xl);
}

/* Stat Cards */
.tc-stat-card {
    background: var(--tc-white);
    border-radius: var(--tc-radius-xl);
    padding: var(--tc-spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--tc-spacing-lg);
    box-shadow: var(--tc-shadow-md);
    transition: transform var(--tc-transition-base), box-shadow var(--tc-transition-base);
    position: relative;
    overflow: hidden;
}

.tc-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--tc-primary), var(--tc-secondary));
}

.tc-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--tc-shadow-xl);
}

.tc-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--tc-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tc-stat-card.tc-stat-primary .tc-stat-icon {
    background: linear-gradient(135deg, var(--tc-primary-light), var(--tc-primary));
    color: var(--tc-white);
}

.tc-stat-card.tc-stat-success .tc-stat-icon {
    background: linear-gradient(135deg, #2ecc71, var(--tc-success));
    color: var(--tc-white);
}

.tc-stat-card.tc-stat-info .tc-stat-icon {
    background: linear-gradient(135deg, #5dade2, var(--tc-info));
    color: var(--tc-white);
}

.tc-stat-card.tc-stat-warning .tc-stat-icon {
    background: linear-gradient(135deg, #f8b500, var(--tc-warning));
    color: var(--tc-white);
}

.tc-stat-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.tc-stat-content h3 {
    margin: 0 0 var(--tc-spacing-xs) 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--tc-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tc-stat-number {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--tc-gray-900);
    line-height: 1;
}

.tc-stat-label {
    font-size: 13px;
    color: var(--tc-gray-500);
}

/* Section Grid */
.tc-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--tc-spacing-lg);
    margin-bottom: var(--tc-spacing-2xl);
}

/* Dashboard Sections */
.tc-dashboard-section {
    background: var(--tc-white);
    border-radius: var(--tc-radius-xl);
    padding: var(--tc-spacing-xl);
    box-shadow: var(--tc-shadow-md);
}

.tc-dashboard-section.tc-full-width {
    grid-column: 1 / -1;
}

.tc-dashboard-section h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--tc-gray-900);
    margin: 0 0 var(--tc-spacing-lg) 0;
    padding-bottom: var(--tc-spacing-md);
    border-bottom: 2px solid var(--tc-gray-100);
}

/* Status Grid */
.tc-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--tc-spacing-md);
    margin-bottom: var(--tc-spacing-xl);
}

.tc-status-item {
    text-align: center;
    padding: var(--tc-spacing-lg);
    background: var(--tc-gray-50);
    border-radius: var(--tc-radius-lg);
    position: relative;
}

.tc-status-count {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--tc-gray-900);
    margin-bottom: var(--tc-spacing-xs);
}

.tc-status-label {
    display: block;
    font-size: 13px;
    color: var(--tc-gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tc-status-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--tc-primary);
    border-radius: 0 0 var(--tc-radius-lg) var(--tc-radius-lg);
    transition: width var(--tc-transition-slow);
}

.tc-status-item.tc-status-pending .tc-status-bar {
    background: var(--tc-warning);
}

.tc-status-item.tc-status-confirmed .tc-status-bar {
    background: var(--tc-success);
}

.tc-status-item.tc-status-completed .tc-status-bar {
    background: var(--tc-info);
}

.tc-status-item.tc-status-cancelled .tc-status-bar {
    background: var(--tc-danger);
}

/* Conversion Rate */
.tc-conversion-rate {
    text-align: center;
    margin-top: var(--tc-spacing-2xl);
}

.tc-conversion-rate h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--tc-gray-700);
    margin-bottom: var(--tc-spacing-lg);
}

.tc-conversion-circle {
    display: flex;
    justify-content: center;
    margin-bottom: var(--tc-spacing-md);
}

.tc-circular-chart {
    width: 150px;
    height: 150px;
}

.tc-circle-bg {
    fill: none;
    stroke: var(--tc-gray-200);
    stroke-width: 3;
}

.tc-circle {
    fill: none;
    stroke: url(#tc-gradient);
    stroke-width: 3;
    stroke-linecap: round;
    animation: tc-progress 1s ease-out forwards;
}

@keyframes tc-progress {
    0% {
        stroke-dasharray: 0 100;
    }
}

.tc-percentage {
    fill: var(--tc-gray-900);
    font-size: 10px;
    font-weight: 700;
    text-anchor: middle;
}

.tc-conversion-label {
    font-size: 14px;
    color: var(--tc-gray-600);
    margin: 0;
}

/* Provider Types */
.tc-provider-types {
    display: flex;
    flex-direction: column;
    gap: var(--tc-spacing-md);
}

.tc-type-item {
    padding: var(--tc-spacing-md);
    background: var(--tc-gray-50);
    border-radius: var(--tc-radius-md);
}

.tc-type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--tc-spacing-sm);
}

.tc-type-name {
    font-weight: 600;
    color: var(--tc-gray-900);
}

.tc-type-count {
    background: var(--tc-primary);
    color: var(--tc-white);
    padding: 2px 10px;
    border-radius: var(--tc-radius-full);
    font-size: 13px;
    font-weight: 700;
}

.tc-type-bar {
    width: 100%;
    height: 8px;
    background: var(--tc-gray-200);
    border-radius: var(--tc-radius-full);
    overflow: hidden;
}

.tc-type-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tc-primary), var(--tc-secondary));
    border-radius: var(--tc-radius-full);
    transition: width var(--tc-transition-slow);
}

/* Chart Container */
.tc-chart-container {
    position: relative;
    height: 350px;
    padding: var(--tc-spacing-lg);
}

/* Data Tables */
.tc-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tc-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tc-data-table thead {
    background: var(--tc-gray-50);
}

.tc-data-table th {
    padding: var(--tc-spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--tc-gray-700);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--tc-gray-200);
}

.tc-data-table td {
    padding: var(--tc-spacing-md);
    border-bottom: 1px solid var(--tc-gray-200);
    color: var(--tc-gray-800);
}

.tc-data-table tbody tr {
    transition: background-color var(--tc-transition-fast);
}

.tc-data-table tbody tr:hover {
    background: var(--tc-gray-50);
}

.tc-data-table a {
    color: var(--tc-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--tc-transition-fast);
}

.tc-data-table a:hover {
    color: var(--tc-primary-dark);
    text-decoration: underline;
}

/* Rank & Medals */
.tc-rank {
    font-weight: 700;
    color: var(--tc-gray-600);
}

.tc-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 13px;
    color: var(--tc-white);
}

.tc-medal.tc-medal-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: var(--tc-gray-900);
}

.tc-medal.tc-medal-2 {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: var(--tc-gray-900);
}

.tc-medal.tc-medal-3 {
    background: linear-gradient(135deg, #cd7f32, #e8a87c);
    color: var(--tc-white);
}

.tc-rating {
    color: var(--tc-warning);
    font-weight: 600;
}

.tc-no-rating {
    color: var(--tc-gray-400);
}

/* City List */
.tc-city-list {
    display: flex;
    flex-direction: column;
    gap: var(--tc-spacing-sm);
}

.tc-city-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--tc-spacing-md);
    background: var(--tc-gray-50);
    border-radius: var(--tc-radius-md);
    transition: background-color var(--tc-transition-fast);
}

.tc-city-item:hover {
    background: var(--tc-gray-100);
}

.tc-city-name {
    display: flex;
    align-items: center;
    gap: var(--tc-spacing-sm);
    font-weight: 600;
    color: var(--tc-gray-900);
}

.tc-city-name .dashicons {
    color: var(--tc-primary);
    font-size: 18px;
}

.tc-city-count {
    background: var(--tc-primary);
    color: var(--tc-white);
    padding: 4px 12px;
    border-radius: var(--tc-radius-full);
    font-size: 13px;
    font-weight: 700;
}

/* Badges */
.tc-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--tc-radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tc-badge-pending {
    background: var(--tc-warning-light);
    color: #856404;
}

.tc-badge-confirmed {
    background: var(--tc-success-light);
    color: #155724;
}

.tc-badge-completed {
    background: var(--tc-info-light);
    color: #004085;
}

.tc-badge-cancelled {
    background: var(--tc-danger-light);
    color: #721c24;
}

/* No Data State */
.tc-no-data {
    text-align: center;
    padding: var(--tc-spacing-2xl);
    color: var(--tc-gray-500);
    font-style: italic;
}

.tc-no-date {
    color: var(--tc-gray-400);
    font-style: italic;
}

/* ===================================
   BUTTONS
   =================================== */
.tc-btn,
.tc-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--tc-radius-md);
    cursor: pointer;
    transition: all var(--tc-transition-base);
    font-family: var(--tc-font-family);
    line-height: 1.5;
}

.tc-btn-primary {
    background: linear-gradient(135deg, var(--tc-primary), var(--tc-secondary));
    color: var(--tc-white);
    box-shadow: var(--tc-shadow-md);
}

.tc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--tc-shadow-lg);
}

.tc-btn-secondary {
    background: var(--tc-gray-100);
    color: var(--tc-gray-900);
}

.tc-btn-secondary:hover {
    background: var(--tc-gray-200);
}

.tc-btn-success {
    background: var(--tc-success);
    color: var(--tc-white);
}

.tc-btn-success:hover {
    background: #229954;
}

.tc-btn-danger {
    background: var(--tc-danger);
    color: var(--tc-white);
}

.tc-btn-danger:hover {
    background: #c0392b;
}

.tc-btn-small,
.button-small {
    padding: 6px 12px;
    font-size: 13px;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1200px) {
    .tc-section-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tc-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tc-stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .tc-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tc-chart-container {
        height: 250px;
    }
    
    .tc-dashboard-section {
        padding: var(--tc-spacing-lg);
    }
}

@media (max-width: 480px) {
    .tc-dashboard-title {
        font-size: 22px;
    }
    
    .tc-stat-number {
        font-size: 24px;
    }
    
    .tc-data-table {
        font-size: 13px;
    }
    
    .tc-data-table th,
    .tc-data-table td {
        padding: var(--tc-spacing-sm);
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
.tc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
.tc-btn:focus,
.tc-button:focus,
a:focus {
    outline: 2px solid var(--tc-primary);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .tc-stat-card::before {
        width: 6px;
    }
    
    .tc-badge {
        border: 2px solid currentColor;
    }
}

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

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    .tc-dashboard-section {
        box-shadow: none;
        border: 1px solid var(--tc-gray-300);
        page-break-inside: avoid;
    }
    
    .tc-btn,
    .tc-button {
        display: none;
    }
    
    .tc-chart-container {
        height: auto;
    }
}

/* ===================================
   DARK MODE SUPPORT (OPTIONAL)
   =================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --tc-gray-50: #212529;
        --tc-gray-100: #343a40;
        --tc-gray-200: #495057;
        --tc-gray-800: #f8f9fa;
        --tc-gray-900: #ffffff;
        --tc-white: #1a1a1a;
    }
    
    .tc-dashboard-section,
    .tc-stat-card {
        background: #2d3339;
        color: #f8f9fa;
    }
}
