/* =================================================================
   ADMIN STYLES - Modern Design
   ================================================================= */

/* Reset and Base */
.airs-admin-wrap * {
    box-sizing: border-box;
}

.airs-admin-wrap {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    /* background: #f6f7fb; */
    min-height: calc(100vh - 32px);
    padding: 0;
    overflow-x: hidden !important;
}

/* Header Section */
.airs-header {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; */
    /* color: white; */
    padding: 2rem 0;
    margin: 0 -20px 0 -20px;
    position: relative;
    overflow: hidden;
}

.airs-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.airs-tab-content {
    width:calc(100% - 25px)
}
.airs-header-content {
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
    padding: 0 30px;
}

.airs-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.airs-header-icon svg {
    color: white;
}

.airs-header-text h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    /* color: white; */
    /* text-shadow: 0 2px 4px rgba(0,0,0,0.1); */
    margin: 0 !important;
    padding: 0;
}

.airs-header-text p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Navigation Tabs */
.airs-nav-tab-wrapper {
    margin: 0 0 2rem 0;
    border-bottom: none;
    background: white;
    border-radius: 5px;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    gap: 0.25rem;
    width: calc(100% - 25px);
    padding-left: 0;
}
.airs-form-actions input[type="submit"],
.airs-nav-tab-wrapper .nav-tab {
    border: none;
    background: transparent;
    color: #566478;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 500;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none !important;
    outline: none !important;
    position: relative;
    box-shadow:  none !important;
}
.airs-form-actions input[type="submit"] {padding: 5px 19px;}
.airs-nav-tab-wrapper .nav-tab:hover {
    background: #f4f4f4;
    color: #475569;
    box-shadow: none;
}

.airs-form-actions input[type="submit"],
.airs-nav-tab-wrapper .nav-tab-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    /* box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3); */
}

.airs-nav-tab-wrapper .nav-tab svg {
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

.airs-nav-tab-wrapper .nav-tab-active svg {
    opacity: 1;
}

/* Card Components */
.airs-card {
    background: white;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
    overflow: hidden;
}

.airs-card-header {
    padding: 25px 30px 20px 30px;
    border-bottom: 1px solid #dbdbdb;
}

.airs-card-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.airs-card-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.airs-card-body {
    padding: 2rem;
}

/* Form Components */
.airs-form-group {
    margin-bottom: 1.5rem;
}

.airs-form-group svg { display: none;}
.airs-form-row {
    display: block;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.airs-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}
#airs-debug-listing-id { max-width: 400px !important;}


.airs-label svg {
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.airs-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: #fafafa;
    color: #111827;
    max-width: 400px;
}

.airs-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.airs-input-small {
    max-width: 120px;
}

.airs-help-text {
    margin-top: 0.5rem;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

.airs-help-text a {
    /* color: #667eea; */
    text-decoration: none;
    font-weight: 500;
    text-decoration: underline;
}

.airs-help-text a:hover {
    text-decoration: underline;
}

/* Custom Checkbox */
.airs-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 400;
}

.airs-checkbox-label input[type="checkbox"] {
    display: none;
}

.airs-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 1px;
}

.airs-checkbox-label input[type="checkbox"]:checked + .airs-checkbox-custom {
    background: #667eea;
    border-color: #667eea;
}

.airs-checkbox-label input[type="checkbox"]:checked + .airs-checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.airs-checkbox-text {
    color: #374151;
    font-weight: 600;
}

.airs-checkbox-text small {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-top: 0.25rem;
    font-weight: 400;
}

/* Buttons */
.airs-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.airs-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.airs-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white;
}


.airs-button-secondary {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.airs-button-secondary:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.airs-button-danger {
    background: #ef444420;
    color: #ef4444;

}

.airs-form-actions {
    /* margin-top: 2rem; */
    /* padding-top: 1.5rem; */
    /* border-top: 1px solid #f1f5f9; */
}

/* Search and Controls */
.airs-batch-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.airs-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.airs-search-wrapper svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.airs-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.875rem;
    background: #fafafa;
    transition: all 0.2s ease;
}

.airs-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.airs-control-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Listing List */
.airs-listing-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    background: #fafafa;
    margin-bottom: 1.5rem;
}
#airs-listing-search {
    height: 45px;
    padding-left: 30px;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: #f1f2f6;
}
.airs-listing-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 10px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.2s ease;
    background: white;
    margin: 0;
}

.airs-listing-item:last-child {
    border-bottom: none;
}

.airs-listing-item:hover {
    background: #f8fafc;
}

.airs-listing-item input[type="checkbox"] {
    display: none;
}

.airs-listing-item .airs-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.airs-listing-item input[type="checkbox"]:checked + .airs-checkbox-custom {
    background: #667eea;
    border-color: #667eea;
}

.airs-listing-item input[type="checkbox"]:checked + .airs-checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.airs-listing-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.airs-listing-title {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.875rem;
}

.airs-listing-id {
    font-size: 0.75rem;
    color: #6b7280;
}

.airs-status-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    line-height: 19px;
}

.airs-status-generated {
    background: #30a844;
    color: #fff;
    /* border: 1px solid #a7f3d0; */
}

.airs-status-generated svg {
    width: 14px;
    height: 14px;
}

.airs-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    color: #6b7280;
    text-align: center;
}

.airs-empty-state svg {
    margin-bottom: 1rem;
    color: #d1d5db;
}

.airs-empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

/* Batch Actions */
.airs-batch-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Progress Container */
.airs-progress-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
}

.airs-progress-container h4 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 600;
}

.airs-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.airs-progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
    transition: width 0.3s ease;
    width: 0%;
}

.airs-progress-text {
    text-align: center;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Log Styles */
.airs-log {
    background: #1a1a1a;
    color: #e5e5e5;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    padding: 1rem;
    border-radius: 5px;
    max-height: 250px;
    overflow-y: auto;
    line-height: 1.4;
    border: 1px solid #374151;
}

.airs-log .log-success {
    color: #10b981;
}

.airs-log .log-error {
    color: #f87171;
}

/* Debug Output */
.airs-debug-output-wrapper {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.airs-debug-output-wrapper h4 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 600;
}

.airs-debug-output {
    background: #1a1a1a;
    color: #e5e5e5;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    padding: 1rem;
    border-radius: 5px;
    max-height: 400px;
    overflow: auto;
    line-height: 1.4;
    border: 1px solid #374151;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Responsive Design */
@media (max-width: 768px) {
    .airs-header-content {
        padding: 0 1rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .airs-header-text h1 {
        font-size: 1.5rem;
    }
    
    .airs-form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .airs-batch-controls {
        flex-direction: column;
    }
    
    .airs-control-buttons {
        justify-content: stretch;
    }
    
    .airs-control-buttons .airs-button {
        flex: 1;
        justify-content: center;
    }
    
    .airs-batch-actions {
        flex-direction: column;
    }
    
    .airs-batch-actions .airs-button {
        justify-content: center;
    }
    
    .airs-card-body,
    .airs-card-header {
        padding: 1.5rem;
    }
}

/*
=================================================================
  FRONTEND STYLES (Unchanged)
=================================================================
*/

/* Main Container */
.ai-review-summary-container {
    margin-bottom: 30px;
}

/* Let theme handle the headline styling */
.ai-review-summary-container h3 {
    margin-top: 0;
    text-align: left; /* Align with theme */
    font-size: 22px;
    margin-bottom: 25px;
    margin-top: 35px;
    display: block;
}

/* Grid Layout */
.airs-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 15px 30px;
    margin-top: 0px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 30px;
}

/* Individual Summary Cards */
.airs-summary-card {
    display: flex;
    align-items: flex-start;
    padding: 0px;
    background-color: #fff;
    border-radius: 5px;
    border-left: 4px solid; /* Color will be set by sentiment */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid #e8e8e8;
    border: none;
}

/* Icon Styles */
.airs-card-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin-right: 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.airs-card-icon svg {
    width: 20px;
    height: 20px;
    fill: #ffffff; /* Icons are white */
}

/* Content Styles */
.airs-card-content h4 {
    margin: 9px 0 8px 0;
    font-size: 16px;
    font-weight: 600; /* Bolder title */
}

.airs-card-content p {
    margin: 0;
    font-size: 14px;
    color: #777;
    line-height: 24px;
    font-weight: 500;
    /* display: none; */
}

/* Positive Sentiment Colors */
.airs-sentiment-positive {
}
.airs-sentiment-positive .airs-card-icon {
    background-color: #28a74525;
}
.airs-sentiment-positive .airs-card-content h4 {
    color: #1e7e34;
}

/* Negative Sentiment Colors */
.airs-sentiment-negative .airs-card-icon {
    background-color: #dc354520;
}
.airs-sentiment-negative .airs-card-content h4 {
    color: #b21f2d;
}

.airs-card-icon svg { display: none;}

.airs-card-icon {
    font-size: 30px;
}

.airs-sentiment-negative .airs-card-icon:before {
    content: "\2212"; /* Unicode for − (minus sign) */
    color: #b21f2d;
}
.airs-sentiment-positive .airs-card-icon:before {
    content: "\002B"; /* Unicode for + (plus sign) */
    color: #1e7e34;
}