/**
 * Voice AI Admin Styles
 */

/* Reset and base styles */
.voice-ai-admin * {
    box-sizing: border-box;
}

/* Common components */
.voice-ai-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: voice-ai-spin 1s linear infinite;
}

@keyframes voice-ai-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.voice-ai-hidden {
    display: none !important;
}

.voice-ai-clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Buttons */
.voice-ai-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.voice-ai-btn:hover {
    background: #135e96;
    color: #fff;
    text-decoration: none;
}

.voice-ai-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.voice-ai-btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.voice-ai-btn-secondary:hover {
    background: #e9ecef;
    color: #333;
}

.voice-ai-btn-danger {
    background: #dc3545;
}

.voice-ai-btn-danger:hover {
    background: #c82333;
}

.voice-ai-btn-success {
    background: #28a745;
}

.voice-ai-btn-success:hover {
    background: #218838;
}

.voice-ai-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.voice-ai-btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

/* Cards */
.voice-ai-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.voice-ai-card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.voice-ai-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.voice-ai-card-subtitle {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #666;
}

.voice-ai-card-body {
    line-height: 1.6;
}

.voice-ai-card-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 20px;
    text-align: right;
}

/* Grid system */
.voice-ai-grid {
    display: grid;
    gap: 20px;
}

.voice-ai-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.voice-ai-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.voice-ai-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Forms */
.voice-ai-form-group {
    margin-bottom: 20px;
}

.voice-ai-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.voice-ai-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
    transition: border-color 0.3s ease;
}

.voice-ai-form-control:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.voice-ai-form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.voice-ai-form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.voice-ai-form-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* Checkboxes and radios */
.voice-ai-checkbox,
.voice-ai-radio {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.voice-ai-checkbox input,
.voice-ai-radio input {
    margin-right: 8px;
    margin-top: 0;
}

/* Tables */
.voice-ai-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.voice-ai-table th,
.voice-ai-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.voice-ai-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.voice-ai-table tr:hover {
    background: #f8f9fa;
}

.voice-ai-table-striped tbody tr:nth-child(even) {
    background: #fafafa;
}

.voice-ai-table-sm th,
.voice-ai-table-sm td {
    padding: 8px 12px;
}

/* Status badges */
.voice-ai-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 4px;
    text-transform: uppercase;
}

.voice-ai-badge-primary {
    background: #2271b1;
}

.voice-ai-badge-success {
    background: #28a745;
}

.voice-ai-badge-warning {
    background: #ffc107;
    color: #333;
}

.voice-ai-badge-danger {
    background: #dc3545;
}

.voice-ai-badge-info {
    background: #17a2b8;
}

.voice-ai-badge-light {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

/* Alerts */
.voice-ai-alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    position: relative;
}

.voice-ai-alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.voice-ai-alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.voice-ai-alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.voice-ai-alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.voice-ai-alert-dismissible {
    padding-right: 50px;
}

.voice-ai-alert-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.voice-ai-alert-close:hover {
    opacity: 1;
}

/* Modals */
.voice-ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.voice-ai-modal.show {
    display: flex;
}

.voice-ai-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

.voice-ai-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.voice-ai-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.voice-ai-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.voice-ai-modal-close:hover {
    color: #333;
}

.voice-ai-modal-body {
    padding: 20px;
}

.voice-ai-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    text-align: right;
}

.voice-ai-modal-footer .voice-ai-btn + .voice-ai-btn {
    margin-left: 10px;
}

/* Tabs */
.voice-ai-tabs {
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.voice-ai-tab-nav {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.voice-ai-tab-item {
    margin-right: 5px;
}

.voice-ai-tab-link {
    display: block;
    padding: 12px 20px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    transition: all 0.3s ease;
}

.voice-ai-tab-link:hover {
    background: #e9ecef;
    color: #333;
    text-decoration: none;
}

.voice-ai-tab-link.active {
    background: #fff;
    color: #2271b1;
    font-weight: 600;
    border-color: #2271b1;
}

.voice-ai-tab-content {
    display: none;
}

.voice-ai-tab-content.active {
    display: block;
}

/* Progress bars */
.voice-ai-progress {
    width: 100%;
    height: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.voice-ai-progress-bar {
    height: 100%;
    background: #2271b1;
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
}

.voice-ai-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

/* Tooltips */
.voice-ai-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.voice-ai-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.voice-ai-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

/* Code blocks */
.voice-ai-code {
    display: inline-block;
    padding: 2px 6px;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #333;
}

.voice-ai-code-block {
    display: block;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    overflow-x: auto;
    white-space: pre;
}

/* Utilities */
.voice-ai-text-center {
    text-align: center;
}

.voice-ai-text-left {
    text-align: left;
}

.voice-ai-text-right {
    text-align: right;
}

.voice-ai-text-muted {
    color: #666;
}

.voice-ai-text-primary {
    color: #2271b1;
}

.voice-ai-text-success {
    color: #28a745;
}

.voice-ai-text-warning {
    color: #ffc107;
}

.voice-ai-text-danger {
    color: #dc3545;
}

.voice-ai-mb-0 { margin-bottom: 0; }
.voice-ai-mb-1 { margin-bottom: 5px; }
.voice-ai-mb-2 { margin-bottom: 10px; }
.voice-ai-mb-3 { margin-bottom: 15px; }
.voice-ai-mb-4 { margin-bottom: 20px; }
.voice-ai-mb-5 { margin-bottom: 25px; }

.voice-ai-mt-0 { margin-top: 0; }
.voice-ai-mt-1 { margin-top: 5px; }
.voice-ai-mt-2 { margin-top: 10px; }
.voice-ai-mt-3 { margin-top: 15px; }
.voice-ai-mt-4 { margin-top: 20px; }
.voice-ai-mt-5 { margin-top: 25px; }

.voice-ai-p-0 { padding: 0; }
.voice-ai-p-1 { padding: 5px; }
.voice-ai-p-2 { padding: 10px; }
.voice-ai-p-3 { padding: 15px; }
.voice-ai-p-4 { padding: 20px; }
.voice-ai-p-5 { padding: 25px; }

/* Responsive design */
@media (max-width: 768px) {
    .voice-ai-grid-2,
    .voice-ai-grid-3,
    .voice-ai-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .voice-ai-modal-content {
        max-width: 95vw;
        margin: 20px;
    }
    
    .voice-ai-tab-nav {
        flex-wrap: wrap;
    }
    
    .voice-ai-tab-item {
        margin-bottom: 5px;
    }
    
    .voice-ai-table {
        font-size: 14px;
    }
    
    .voice-ai-table th,
    .voice-ai-table td {
        padding: 8px 10px;
    }
    
    .voice-ai-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .voice-ai-modal-header,
    .voice-ai-modal-body,
    .voice-ai-modal-footer {
        padding: 15px;
    }
    
    .voice-ai-card {
        padding: 15px;
    }
    
    .voice-ai-form-control {
        padding: 8px 10px;
    }
}

/* Print styles */
@media print {
    .voice-ai-modal,
    .voice-ai-btn,
    .voice-ai-alert-close,
    .no-print {
        display: none !important;
    }
    
    .voice-ai-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .voice-ai-table {
        box-shadow: none;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .voice-ai-card {
        background: #2c2c2c;
        border-color: #444;
        color: #fff;
    }
    
    .voice-ai-form-control {
        background: #333;
        border-color: #555;
        color: #fff;
    }
    
    .voice-ai-modal-content {
        background: #2c2c2c;
        color: #fff;
    }
}

/* Animation classes */
.voice-ai-fade-in {
    animation: voiceAiFadeIn 0.3s ease-in;
}

@keyframes voiceAiFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.voice-ai-slide-in {
    animation: voiceAiSlideIn 0.3s ease-out;
}

@keyframes voiceAiSlideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Focus styles for accessibility */
.voice-ai-btn:focus,
.voice-ai-form-control:focus,
.voice-ai-tab-link:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Screen reader only text */
.voice-ai-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Voice AI Frontend Styles */
.voice-ai-frontend {
    /* Frontend styles will go here */
}
