/**
 * Smart Support Admin Inline Styles
 * Consolidated from various admin files
 */

/* Approval Status Styles */
.approval-status-approved {
    color: #00a32a !important;
    font-weight: bold !important;
}

.approval-status-unapproved {
    color: #d63638 !important;
    font-weight: bold !important;
}

/* Widget Styles */
.smart-support-widget {
    --primary-color: #007cba;
}

/* Form Styles */
.hidden {
    display: none !important;
}

.inline {
    display: inline !important;
}

/* File Input Styles */
.file-input-text {
    display: none;
}

.selected-files {
    display: none;
}

.btn-loading {
    display: none;
}

.preview-modal {
    display: none;
}

/* Department Badge Styles */
.department-badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    color: #fff;
}

/* Status Badge Styles */
.status-badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    color: #fff;
}

/* Priority Color Styles */
.priority-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Progress Bar Styles */
.progress-bar {
    height: 8px;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Color Preview Styles */
.color-preview {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Department Color Option Styles */
.department-color-option {
    /* Dynamic color will be applied via inline style */
}

/* Widget Actions Styles */
.widget-actions {
    margin-top: 15px;
}

/* Customer Info Styles */
.customer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.customer-info h4 {
    margin: 0 0 5px 0;
}

.customer-info p {
    margin: 0 0 5px 0;
    color: #646970;
}

.customer-since {
    margin: 0;
    font-size: 12px;
    color: #646970;
}

/* Custom Fields Actions Styles */
.custom-fields-actions {
    margin-top: 15px;
}

/* Form Width Styles */
.form-full-width {
    width: 100%;
}

.form-full-width-margin-bottom {
    width: 100%;
    margin-bottom: 10px;
}

/* Flex Layout Styles */
.flex-center {
    display: flex;
    align-items: center;
}

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

/* Department Color Styles */
.department-color {
    /* Dynamic color will be applied via inline style */
}

/* Settings Styles */
.smart-support-settings {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.settings-navigation {
    min-width: 200px;
    flex-shrink: 0;
}

.settings-tabs {
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.settings-tabs .tab {
    border-bottom: 1px solid #ddd;
}

.settings-tabs .tab:last-child {
    border-bottom: none;
}

.settings-tabs .tab a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.settings-tabs .tab a:hover {
    background-color: #f0f0f1;
}

.settings-tabs .tab.active a {
    background-color: #007cba;
    color: #fff;
}

.settings-content {
    flex: 1;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

/* User Roles Styles */
.smart-support-roles-table {
    margin-top: 20px;
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
}

.smart-support-roles-table th,
.smart-support-roles-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #c3c4c7;
}

.smart-support-roles-table th {
    background-color: #f0f0f1;
    font-weight: 600;
}

.smart-support-roles-table tr:hover {
    background-color: #f6f7f7;
}

.capability-name {
    width: 300px;
    min-width: 300px;
    font-weight: 600;
    color: #1d2327;
}

.capability-description {
    color: #646970;
    font-size: 13px;
}

.role-column {
    text-align: center;
    min-width: 120px;
}

.role-column input[type="checkbox"] {
    margin: 0;
}


/* Ticket View Styles */
.ticket-view-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.ticket-main-content {
    flex: 1;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
}

.ticket-sidebar {
    width: 300px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
}

.ticket-replies {
    margin-top: 20px;
}

.reply-item {
    background: #f6f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.reply-author {
    font-weight: 600;
    color: #1d2327;
}

.reply-date {
    color: #646970;
    font-size: 12px;
}

.reply-content {
    line-height: 1.6;
}

/* Support Styles */
.support-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.support-header {
    text-align: center;
    margin-bottom: 30px;
}

.support-header h1 {
    color: #1d2327;
    margin-bottom: 10px;
}

.support-header p {
    color: #646970;
    font-size: 16px;
}

.support-content {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 30px;
}

/* Products Styles */
.products-container {
    margin-top: 20px;
}

.product-item {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 5px;
}

.product-description {
    color: #646970;
    font-size: 13px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

/* Priorities Styles */
.priorities-container {
    margin-top: 20px;
}

.priority-item {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 15px;
}

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

.priority-name {
    font-weight: 600;
    color: #1d2327;
}

.priority-stats {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: 600;
    color: #1d2327;
}

.stat-label {
    font-size: 12px;
    color: #646970;
    text-transform: uppercase;
}

.priority-progress {
    margin-top: 15px;
}

.progress-container {
    background: #f0f0f1;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    margin-top: 5px;
}

/* Departments Styles */
.departments-container {
    margin-top: 20px;
}

.department-item {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.department-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.department-name {
    font-weight: 600;
    color: #1d2327;
}

.department-actions {
    display: flex;
    gap: 10px;
}

/* Analytics Styles */
.analytics-container {
    margin-top: 20px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.analytics-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
}

.analytics-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1d2327;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 15px;
}

.trend-chart-container {
    max-width: 100%;
    justify-self: center;
}

.status-chart-container {
    max-width: 100%;
    justify-self: center;
}

/* Responsive Styles */
@media screen and (max-width: 900px) {
    .smart-support-roles-table {
        font-size: 13px;
    }

    .capability-name {
        width: 250px;
        min-width: 250px;
    }

    .capability-description {
        font-size: 11px;
    }

    .ticket-view-container {
        flex-direction: column;
    }

    .ticket-sidebar {
        width: 100%;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }
} 

/* Smart Support Admin Styles */

/* =======================
   GENERAL ADMIN STYLES
   ======================= */

/* =======================
   INLINE STYLE REPLACEMENTS
   ======================= */

/* Display utilities */
.hidden { display: none !important; }
.flex { display: flex !important; }
.inline { display: inline !important; }
.inline-block { display: inline-block !important; }

/* Flex utilities */
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; justify-content: space-between; }
.flex-end { display: flex; justify-content: flex-end; }
.flex-gap-10 { display: flex; gap: 10px; }
.flex-gap-15 { display: flex; gap: 15px; }
.flex-gap-20 { display: flex; gap: 20px; }

/* Margin utilities */
.margin-top-10 { margin-top: 10px !important; }
.margin-top-15 { margin-top: 15px !important; }
.margin-top-18 { margin-top: 18px !important; }
.margin-bottom-10 { margin-bottom: 10px !important; }
.margin-bottom-15 { margin-bottom: 15px !important; }
.margin-bottom-18 { margin-bottom: 18px !important; }
.margin-0 { margin: 0 !important; }

/* Padding utilities */
.padding-0 { padding: 0 !important; }

/* Width utilities */
.width-100 { width: 100% !important; }
.width-100vw { width: 100vw !important; }
.min-width-320 { min-width: 320px !important; }

/* Height utilities */
.height-100vh { height: 100vh !important; }

/* Position utilities */
.position-fixed { position: fixed !important; }
.position-absolute { position: absolute !important; }
.top-0 { top: 0 !important; }
.left-0 { left: 0 !important; }
.top-10 { top: 10px !important; }
.right-10 { right: 10px !important; }
.top-50 { top: 50% !important; }
.left-50 { left: 50% !important; }

/* Transform utilities */
.transform-center { transform: translate(-50%, -50%) !important; }

/* Z-index utilities */
.z-index-1000 { z-index: 1000 !important; }
.z-index-1001 { z-index: 1001 !important; }

/* Background utilities */
.bg-white { background: #fff !important; }
.bg-none { background: none !important; }
.bg-rgba-black-35 { background: rgba(0,0,0,0.35) !important; }

/* Border utilities */
.border-none { border: none !important; }
.border-radius-8 { border-radius: 8px !important; }
.border-radius-3 { border-radius: 3px !important; }

/* Box shadow utilities */
.box-shadow-modal { box-shadow: 0 4px 24px rgba(0,0,0,0.18) !important; }

/* Font utilities */
.font-size-12 { font-size: 12px !important; }
.font-size-15 { font-size: 15px !important; }
.font-size-16 { font-size: 16px !important; }
.font-size-20 { font-size: 20px !important; }
.font-size-22 { font-size: 22px !important; }

/* Font weight utilities */
.font-weight-600 { font-weight: 600 !important; }

/* Color utilities */
.color-888 { color: #888 !important; }
.color-23282d { color: #23282d !important; }
.color-646970 { color: #646970 !important; }
.color-00a32a { color: #00a32a !important; }
.color-d63638 { color: #d63638 !important; }
.color-f0f0f1 { color: #f0f0f1 !important; }

/* Cursor utilities */
.cursor-pointer { cursor: pointer !important; }

/* Flex utilities for specific components */
.flex-1 { flex: 1 !important; }

/* =======================
   COMPONENT-SPECIFIC STYLES
   ======================= */

/* =======================
   ANALYTICS STYLES
   ======================= */

.smart-support-analytics {
    background: #f6f7f7;
    min-height: 100vh;
    padding: 20px;
}

/* Simple Date Filter */
.simple-date-filter {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e4e7;
}

.date-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.date-input {
    padding: 8px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s ease;
}

.date-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.date-separator {
    color: #646970;
    font-size: 14px;
    font-weight: 500;
}

.date-submit {
    padding: 8px 16px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.date-submit:hover {
    background: #005a87;
}

/* Analytics Overview */
.analytics-overview {
    margin-bottom: 32px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #007cba;
    border-radius: 2px;
}

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

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e4e7;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--stat-color, #007cba);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-card.stat-primary { --stat-color: #007cba; }
.stat-card.stat-success { --stat-color: #00a32a; }
.stat-card.stat-warning { --stat-color: #f56e28; }
.stat-card.stat-info { --stat-color: #00a0d2; }
.stat-card.stat-secondary { --stat-color: #8c8f94; }
.stat-card.stat-accent { --stat-color: #7c3aed; }
.stat-card.stat-rating { --stat-color: #f59e0b; }
.stat-card.stat-auto { --stat-color: #059669; }

.stat-icon {
    margin-bottom: 16px;
}

.stat-icon .dashicons {
    font-size: 32px;
    color: var(--stat-color, #007cba);
}

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

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

/* Analytics Charts */
.analytics-charts {
    margin-bottom: 32px;
}

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

.chart-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e4e7;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.chart-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e4e7;
    background: #f9f9f9;
}

.chart-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-title .dashicons {
    color: #007cba;
    font-size: 18px;
}

.chart-body {
    padding: 16px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chart-body.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f1;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Analytics Sections */
.analytics-section {
    margin-bottom: 32px;
}

.data-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e4e7;
    overflow: hidden;
    transition: all 0.3s ease;
}

.data-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.table-responsive {
    overflow-x: auto;
}

.analytics-table {
    border: none;
    margin: 0;
}

.analytics-table th {
    background: #f9f9f9;
    border-bottom: 2px solid #e2e4e7;
    font-weight: 600;
    color: #1d2327;
    padding: 16px 12px;
    font-size: 14px;
}

.analytics-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: middle;
}

.analytics-table tr:hover {
    background: #f9f9f9;
}

/* Analytics Tabs Styles */
.analytics-tabs {
    margin-bottom: 20px;
}

.analytics-tabs .nav-tab-wrapper {
    border-bottom: 1px solid #ccd0d4;
    margin-bottom: 0;
}

.analytics-tabs .nav-tab {
    background: #f1f1f1;
    border: 1px solid #ccd0d4;
    border-bottom: none;
    color: #555;
    cursor: pointer;
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    line-height: 2.15384615;
    margin: 0 0.5em 0 0;
    padding: 8px 12px;
    text-decoration: none;
    white-space: nowrap;
}

.analytics-tabs .nav-tab:hover {
    background: #fafafa;
    color: #135e96;
}

.analytics-tabs .nav-tab.nav-tab-active {
    background: #fff;
    border-bottom: 1px solid #fff;
    color: #000;
    margin-bottom: -1px;
}

.analytics-tabs .nav-tab .dashicons {
    margin-right: 5px;
    font-size: 16px;
    vertical-align: middle;
}

.text-center {
    text-align: center;
}

.no-data {
    text-align: center;
    color: #646970;
    font-style: italic;
    padding: 40px 20px;
}

.no-data .dashicons {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

/* Department Badge */
.department-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Rate Badge */
.rate-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #e8f5e8;
    color: #00a32a;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Agent Rating Display */
.agent-rating-display {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

.agent-rating-display .star {
    color: #dcdcde;
    font-size: 14px;
}

.agent-rating-display .star.filled {
    color: #f59e0b;
}

.rating-value {
    margin-left: 4px;
    font-weight: 600;
    color: #1d2327;
    font-size: 12px;
}

.no-rating {
    color: #646970;
    font-style: italic;
}

.agent-name {
    font-weight: 500;
    color: #1d2327;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f1;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .smart-support-analytics {
        padding: 16px;
    }
    
    .simple-date-filter {
        padding: 12px 16px;
    }
    
    .date-inputs {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .date-input {
        width: 100%;
    }
    
    .date-separator {
        text-align: center;
    }
    
    .date-submit {
        width: 100%;
        padding: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .chart-card {
        margin-bottom: 16px;
    }
    
    .chart-body {
        padding: 12px;
        min-height: 180px;
    }
    
    .analytics-table {
        font-size: 13px;
    }
    
    .analytics-table th,
    .analytics-table td {
        padding: 12px 8px;
    }
}

@media (max-width: 480px) {
    .smart-support-analytics {
        padding: 12px;
    }
    
    .simple-date-filter {
        padding: 10px 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .chart-header {
        padding: 16px;
    }
    
    .chart-body {
        padding: 12px;
        min-height: 200px;
    }
}

/* =======================
   DEPARTMENTS STYLES
   ======================= */

.departments-container {
    margin-top: 20px;
}

.department-item {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.department-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.department-name {
    font-weight: 600;
    color: #1d2327;
}

.department-actions {
    display: flex;
    gap: 10px;
}

/* =======================
   RESPONSIVE STYLES
   ======================= */

@media screen and (max-width: 900px) {
    .smart-support-roles-table {
        font-size: 13px;
    }

    .capability-name {
        width: 250px;
        min-width: 250px;
    }

    .capability-description {
        font-size: 11px;
    }

    .ticket-view-container {
        flex-direction: column;
    }

    .ticket-sidebar {
        width: 100%;
    }
} 