/**
 * Whisper Transcriber Styles
 * Clean, minimal design inspired by modern UI patterns
 * 
 * @package Whisper_Transcriber
 */

/* Reset and Base Styles */
.wt-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    background: #f5f5f5;
}

.wt-wrapper * {
    box-sizing: border-box;
}

/* Tab Navigation */
.wt-tabs {
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}

.wt-tab {
    flex: 1;
    padding: 20px 40px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wt-tab:hover {
    color: #333;
    background: #fafafa;
}

.wt-tab-active {
    color: #000;
    border-bottom-color: #FDB022;
}

/* Content Area */
.wt-content {
    background: #f5f5f5;
    padding: 40px 20px;
}

.wt-tab-content {
    display: none;
}

.wt-tab-content.wt-tab-active {
    display: block;
}

/* Step Cards */
.wt-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.wt-step-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.wt-step-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wt-step-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.wt-step-icon-disabled {
    opacity: 0.3;
}

.wt-step-title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin: 0 0 12px 0;
}

.wt-step-title-disabled {
    color: #999;
}

.wt-step-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 24px 0;
}

.wt-step-description-disabled {
    color: #aaa;
}

/* Form Elements */
.wt-form-group {
    margin-bottom: 0;
}

.wt-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.wt-select:focus {
    outline: none;
    border-color: #FDB022;
    box-shadow: 0 0 0 3px rgba(253, 176, 34, 0.1);
}

.wt-select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.5;
}

/* File Upload */
.wt-upload-area {
    position: relative;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.wt-upload-area:hover {
    border-color: #FDB022;
    background: #fffbf5;
}

.wt-upload-area.wt-disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.wt-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.wt-file-input:disabled {
    cursor: not-allowed;
}

.wt-upload-placeholder {
    pointer-events: none;
}

.wt-upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.wt-upload-text {
    font-size: 14px;
    color: #999;
    margin: 0;
}

.wt-file-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    text-align: left;
    color: #0c4a6e;
    font-size: 14px;
}

/* Checkboxes */
.wt-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.wt-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.wt-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #FDB022;
}

.wt-checkbox input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.wt-checkbox:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.4;
}

/* Buttons */
.wt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wt-btn-primary {
    width: 100%;
    background: #FDB022;
    color: #000;
}

.wt-btn-primary:hover:not(:disabled) {
    background: #f5a310;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(253, 176, 34, 0.3);
}

.wt-btn-primary:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.wt-btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e0e0e0;
}

.wt-btn-secondary:hover {
    background: #e8e8e8;
}

.wt-btn-success {
    background: #10b981;
    color: #fff;
}

.wt-btn-success:hover {
    background: #059669;
}

/* Status Messages */
.wt-status {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.wt-status-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wt-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: #FDB022;
    border-radius: 50%;
    animation: wt-spin 0.8s linear infinite;
}

@keyframes wt-spin {
    to { transform: rotate(360deg); }
}

.wt-status-text {
    flex: 1;
    font-size: 15px;
    color: #333;
}

.wt-status.wt-status-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.wt-status.wt-status-success .wt-status-text {
    color: #065f46;
}

.wt-status.wt-status-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.wt-status.wt-status-error .wt-status-text {
    color: #991b1b;
}

.wt-progress-bar {
    margin-top: 16px;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.wt-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FDB022, #f5a310);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Results */
.wt-results {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.wt-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.wt-results-title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.wt-results-actions {
    display: flex;
    gap: 12px;
}

.wt-transcript {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 24px;
}

.wt-timestamp {
    color: #FDB022;
    font-weight: 600;
}

/* Stats */
.wt-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.wt-stat {
    background: #fafafa;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.wt-stat-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wt-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #000;
}

/* Empty State */
.wt-empty-state {
    text-align: center;
    padding: 80px 20px;
}

.wt-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.wt-empty-state h3 {
    font-size: 20px;
    color: #333;
    margin: 0 0 8px 0;
}

.wt-empty-state p {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wt-tabs {
        flex-direction: column;
    }
    
    .wt-tab {
        padding: 16px 20px;
        text-align: left;
    }
    
    .wt-content {
        padding: 24px 16px;
    }
    
    .wt-steps {
        grid-template-columns: 1fr;
    }
    
    .wt-step-card {
        padding: 24px;
    }
    
    .wt-results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wt-results-actions {
        width: 100%;
    }
    
    .wt-results-actions .wt-btn {
        flex: 1;
    }
    
    .wt-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .wt-step-title {
        font-size: 20px;
    }
    
    .wt-stats {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
.wt-transcript::-webkit-scrollbar {
    width: 8px;
}

.wt-transcript::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.wt-transcript::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.wt-transcript::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wt-results {
    animation: fadeIn 0.4s ease;
}

.wt-step-card {
    animation: fadeIn 0.3s ease;
}

.wt-step-card:nth-child(1) {
    animation-delay: 0.1s;
}

.wt-step-card:nth-child(2) {
    animation-delay: 0.2s;
}

.wt-step-card:nth-child(3) {
    animation-delay: 0.3s;
}