/* Opti-Behavior Pro Admin Styles */

.opti-behavior-pro-wrap {
    max-width: 1400px;
    margin: 20px 0;
}

.opti-behavior-pro-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.opti-behavior-pro-header h1 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 32px;
}

.opti-behavior-pro-header p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 16px;
}

.opti-behavior-pro-filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.opti-behavior-pro-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.opti-behavior-pro-filter-group label {
    font-weight: 600;
    color: #1e293b;
}

.opti-behavior-pro-filter-group select {
    min-width: 150px;
}

.opti-behavior-pro-view-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.opti-behavior-pro-view-toggle .button {
    display: flex;
    align-items: center;
    gap: 8px;
}

.opti-behavior-pro-view-toggle .button.active {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

.opti-behavior-pro-recordings-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.opti-behavior-pro-recording-item {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.opti-behavior-pro-recording-item:hover {
    background: #f8fafc;
}

.opti-behavior-pro-recording-item:last-child {
    border-bottom: none;
}

.opti-behavior-pro-recording-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #1e293b;
}

.opti-behavior-pro-recording-meta {
    display: flex;
    gap: 20px;
    color: #64748b;
    font-size: 14px;
}

.opti-behavior-pro-recording-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.opti-behavior-pro-recording-actions {
    display: flex;
    gap: 10px;
}

.opti-behavior-pro-player {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.opti-behavior-pro-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.opti-behavior-pro-player-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.opti-behavior-pro-player-viewport {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

.opti-behavior-pro-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.opti-behavior-pro-empty-state .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.opti-behavior-pro-empty-state h3 {
    color: #475569;
    margin-bottom: 10px;
}

.opti-behavior-pro-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.opti-behavior-pro-table table {
    width: 100%;
    border-collapse: collapse;
}

.opti-behavior-pro-table th {
    background: #f8fafc;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
}

.opti-behavior-pro-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}

.opti-behavior-pro-table tr:hover {
    background: #f8fafc;
}

.opti-behavior-pro-table tr:last-child td {
    border-bottom: none;
}

.opti-behavior-pro-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #e0e7ff;
    color: #4338ca;
}

.opti-behavior-pro-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.opti-behavior-pro-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.opti-behavior-pro-badge.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Loading spinner */
.opti-behavior-pro-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
    color: #64748b;
}

.opti-behavior-pro-loading .spinner {
    float: none;
    margin: 0 10px 0 0;
}

/* Responsive */
@media (max-width: 768px) {
    .opti-behavior-pro-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .opti-behavior-pro-filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .opti-behavior-pro-recording-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .opti-behavior-pro-recording-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* Advanced Filters Panel */
.filter-toggle-btn,
.filter-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.filter-toggle-btn:hover,
.filter-clear-btn:hover {
    background: #e0e0e1;
    border-color: #8c8f94;
}

.filter-toggle-btn.active {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

.filter-clear-btn {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.filter-clear-btn:hover {
    background: #c82333;
    border-color: #bd2130;
}

/* Advanced Filters Panel - Modern Vertical Layout */
.advanced-filters-panel {
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 32px;
    margin: 24px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.advanced-filters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-bottom: 24px;
}

.filter-column {
    background: #f9fafb;
    padding: 28px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.filter-column:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.1);
}

.filter-column-title {
    margin: 0 0 20px 0;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-column-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #2271b1;
    border-radius: 2px;
}

/* Each filter on its own line - very compact */
.filter-group {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.3;
    width: 100%;
}

.advanced-filter-select,
.advanced-filter-input {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #1f2937;
    background: white;
    transition: all 0.2s ease;
    line-height: 1.4;
    box-sizing: border-box;
}

.advanced-filter-select:hover,
.advanced-filter-input:hover {
    border-color: #9ca3af;
}

.advanced-filter-select:focus,
.advanced-filter-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
    background: #ffffff;
}

.advanced-filter-input::placeholder {
    color: #9ca3af;
    font-size: 13px;
}

.advanced-filters-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.advanced-filters-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
}

/* Active filter indicator */
.filter-active-badge {
    display: inline-block;
    background: #2271b1;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 600;
}

/* Watched status indicator in recordings list */
.recording-watched-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #10b981;
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.recording-unwatched-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #94a3b8;
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .advanced-filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .advanced-filters-grid {
        grid-template-columns: 1fr;
    }

    .advanced-filters-actions {
        flex-direction: column;
    }

    .advanced-filters-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Responsive admin usability hardening for shared Pro shells. */
.opti-behavior-pro-wrap,
.opti-behavior-pro-wrap *,
.opti-behavior-pro-page,
.opti-behavior-pro-page * {
	box-sizing: border-box;
}

.opti-behavior-pro-wrap,
.opti-behavior-pro-page,
.opti-behavior-pro-header,
.opti-behavior-pro-content,
.opti-behavior-pro-card,
.opti-behavior-pro-table,
.pro-stats-grid,
.pro-metrics-grid {
	max-width: 100%;
	min-width: 0;
}

.opti-behavior-pro-header,
.opti-behavior-pro-header-content,
.opti-behavior-pro-actions,
.opti-behavior-pro-filters {
	max-width: 100%;
	min-width: 0;
	flex-wrap: wrap;
}

.opti-behavior-pro-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.opti-behavior-pro-table table {
	min-width: 640px;
}

.pro-stats-grid,
.pro-metrics-grid {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)) !important;
}

@media (max-width: 782px) {
	.opti-behavior-pro-header,
	.opti-behavior-pro-header-content,
	.opti-behavior-pro-actions,
	.opti-behavior-pro-filters {
		align-items: stretch;
		flex-direction: column;
	}

	.opti-behavior-pro-actions > *,
	.opti-behavior-pro-filters > *,
	.opti-behavior-pro-wrap select,
	.opti-behavior-pro-wrap input,
	.opti-behavior-pro-wrap button,
	.opti-behavior-pro-wrap .button {
		max-width: 100%;
	}
}

