/**
 * GetVid Downloader - Frontend Styles
 */

/* Container */
.getvid-container {
    max-width: 1400px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Download Form */
.getvid-download-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.getvid-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.getvid-icon {
    font-size: 1.5em;
}

/* Form Elements */
.getvid-form-group {
    margin-bottom: 1.5rem;
}

.getvid-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.getvid-input,
.getvid-select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #ffffff;
}

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

.getvid-help-text {
    margin: 0.5rem 0 0 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Buttons */
.getvid-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.getvid-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    width: 100%;
    justify-content: center;
}

.getvid-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.getvid-button-primary:active {
    transform: translateY(0);
}

.getvid-button-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.getvid-button-secondary {
    background: #f3f4f6;
    color: #374151;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.getvid-button-secondary:hover {
    background: #e5e7eb;
}

.getvid-button-icon {
    font-size: 1.2em;
}

/* Messages */
.getvid-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.getvid-message.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.getvid-message.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.getvid-message.info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Status Bar */
.getvid-status {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.getvid-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.getvid-status-text {
    flex: 1;
    font-weight: 500;
    color: #92400e;
}

.getvid-status-percent {
    font-weight: 700;
    font-size: 1.1em;
    color: #92400e;
    min-width: 50px;
    text-align: right;
}

.getvid-status-icon {
    font-size: 1.25em;
    animation: spin 2s linear infinite;
}

/* Visual Progress Bar */
.getvid-progress-bar-container {
    width: 100%;
    height: 24px;
    background: #f3f4f6;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.getvid-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 12px;
    transition: none;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    position: relative;
}

.getvid-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Files Section */
.getvid-files-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.getvid-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.getvid-files-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.getvid-files-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* File Item */
.getvid-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    transition: all 0.2s ease;
    gap: 1rem;
}

.getvid-file-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.getvid-file-info {
    flex: 1;
    min-width: 0;
}

.getvid-file-name {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.getvid-file-icon {
    font-size: 1.25em;
    flex-shrink: 0;
}

.getvid-file-meta {
    font-size: 0.875rem;
    color: #6b7280;
}

.getvid-file-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.getvid-button-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.getvid-button-small span {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

.getvid-button-download {
    background-color: #2563eb !important; /* Močna, živa modra */
    color: #ffffff !important;            /* Čisto bela */
    font-weight: 800 !important;          /* Zelo krepko besedilo */
    text-transform: uppercase;            /* Velike črke za boljšo berljivost */
    font-size: 0.85rem !important;
    padding: 8px 16px !important;
    border: 1px solid #1d4ed8 !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
    opacity: 1 !important;
}

.getvid-button-download:hover {
    background-color: #1e40af !important; /* Temnejša ob preletu */
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
    text-decoration: none !important;
}

.getvid-button-delete {
    background-color: #dc2626 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 8px 16px !important;
    border: 1px solid #b91c1c !important;
}

.getvid-button-delete:hover {
    background-color: #991b1b !important;
}

/* Loading State */
.getvid-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem;
    color: #6b7280;
}

.getvid-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Empty State */
.getvid-empty-state {
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
}

.getvid-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Dark Theme */
.getvid-container[data-theme="dark"] .getvid-download-form,
.getvid-container[data-theme="dark"] .getvid-files-section {
    background: #1f2937;
}

.getvid-container[data-theme="dark"] .getvid-title,
.getvid-container[data-theme="dark"] .getvid-files-title,
.getvid-container[data-theme="dark"] .getvid-file-name {
    color: #f9fafb;
}

.getvid-container[data-theme="dark"] .getvid-input,
.getvid-container[data-theme="dark"] .getvid-select {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.getvid-container[data-theme="dark"] .getvid-file-item {
    background: #374151;
}

.getvid-container[data-theme="dark"] .getvid-file-item:hover {
    background: #4b5563;
}

/* Responsive */
@media (max-width: 768px) {
    .getvid-container {
        margin: 1rem;
    }
    
    .getvid-download-form,
    .getvid-files-section {
        padding: 1.5rem;
    }
    
    .getvid-file-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .getvid-file-actions {
        width: 100%;
    }
    
    .getvid-button-small {
        flex: 1;
    }
    
    .getvid-files-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Minimal Theme */
.getvid-container[data-theme="minimal"] .getvid-download-form,
.getvid-container[data-theme="minimal"] .getvid-files-section {
    box-shadow: none;
    border: 1px solid #e5e7eb;
}
