/**
 * Video Descriptions Generator - Styles
 * Responsive, modern design with scoped classes
 */

/* Container and Layout */
.vdesc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header Section */
.vdesc-header {
    text-align: center;
    margin-bottom: 30px;
}

.vdesc-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vdesc-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* Form Layout */
.vdesc-form {
    width: 100%;
}

.vdesc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

/* Card Styles */
.vdesc-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.vdesc-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.vdesc-card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Form Elements */
.vdesc-form-group {
    margin-bottom: 20px;
}

.vdesc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.vdesc-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.vdesc-input,
.vdesc-textarea,
.vdesc-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.vdesc-input:focus,
.vdesc-textarea:focus,
.vdesc-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.vdesc-input:hover,
.vdesc-textarea:hover,
.vdesc-select:hover {
    border-color: #cbd5e0;
}

.vdesc-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Button Styles */
.vdesc-button-group {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.vdesc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    justify-content: center;
    min-height: 48px;
    box-sizing: border-box;
}

.vdesc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.vdesc-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

.vdesc-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.vdesc-btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.vdesc-btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.vdesc-btn-success {
    background: #48bb78;
    color: white;
}

.vdesc-btn-success:hover {
    background: #38a169;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.vdesc-btn-info {
    background: #4299e1;
    color: white;
}

.vdesc-btn-info:hover {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

.vdesc-btn-small {
    padding: 6px 12px;
    font-size: 0.875rem;
    min-height: auto;
}

/* Results Section */
.vdesc-results {
    min-height: 200px;
    margin-bottom: 20px;
}

.vdesc-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.vdesc-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.vdesc-placeholder p {
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    font-weight: 500;
}

.vdesc-placeholder small {
    font-size: 0.9rem;
    color: #a0aec0;
}

/* Description Items */
.vdesc-description-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.vdesc-description-item:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.vdesc-description-header {
    background: #edf2f7;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.vdesc-description-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
}

.vdesc-description-content {
    padding: 16px;
    line-height: 1.6;
    color: #2d3748;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
    border: none;
    outline: none;
}

.vdesc-description-content:focus {
    background-color: #fff;
    border: 2px solid #667eea;
    border-radius: 4px;
}

.vdesc-description-content:empty:before {
    content: "Click to edit...";
    color: #a0aec0;
    font-style: italic;
}

/* Actions */
.vdesc-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Loading Animation */
.vdesc-loader {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

@keyframes vdesc-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.vdesc-loader {
    animation: vdesc-pulse 1.5s infinite;
}

/* Notifications */
.vdesc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.vdesc-notification-show {
    transform: translateX(0);
}

.vdesc-notification-success {
    background: #48bb78;
}

.vdesc-notification-error {
    background: #f56565;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vdesc-container {
        padding: 15px;
    }
    
    .vdesc-title {
        font-size: 2rem;
    }
    
    .vdesc-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .vdesc-form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .vdesc-button-group {
        flex-direction: column;
    }
    
    .vdesc-btn {
        width: 100%;
    }
    
    .vdesc-actions {
        flex-direction: column;
    }
    
    .vdesc-actions .vdesc-btn {
        width: 100%;
    }
    
    .vdesc-card {
        padding: 20px;
    }
    
    .vdesc-notification {
        left: 15px;
        right: 15px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .vdesc-notification-show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .vdesc-container {
        padding: 10px;
    }
    
    .vdesc-title {
        font-size: 1.8rem;
    }
    
    .vdesc-subtitle {
        font-size: 1rem;
    }
    
    .vdesc-card {
        padding: 15px;
    }
    
    .vdesc-input,
    .vdesc-textarea,
    .vdesc-select {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .vdesc-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* Accessibility Improvements */
.vdesc-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.vdesc-input:focus,
.vdesc-textarea:focus,
.vdesc-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .vdesc-card {
        border: 2px solid #000;
    }
    
    .vdesc-btn-primary {
        background: #000;
        color: #fff;
    }
    
    .vdesc-input,
    .vdesc-textarea,
    .vdesc-select {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .vdesc-card,
    .vdesc-btn,
    .vdesc-input,
    .vdesc-textarea,
    .vdesc-select,
    .vdesc-notification {
        transition: none;
    }
    
    .vdesc-card:hover {
        transform: none;
    }
    
    .vdesc-btn:hover {
        transform: none;
    }
    
    .vdesc-loader {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .vdesc-container {
        max-width: none;
        padding: 0;
    }
    
    .vdesc-grid {
        grid-template-columns: 1fr;
    }
    
    .vdesc-input-card {
        display: none;
    }
    
    .vdesc-results-card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .vdesc-actions {
        display: none;
    }
    
    .vdesc-description-content {
        background: none;
        border: none;
        padding: 10px 0;
    }
}
    