/* Modal styles */
#video-options-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}
.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    z-index: 1;
    width: 600px;
}
.modal-header {
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.modal-header h2 {
    margin: 0;
}
.modal-body {
    display: flex;
    gap: 20px;
}
.modal-col {
    flex: 1;
}
.modal-col label, .modal-col fieldset {
    display: block;
    margin-bottom: 15px;
}
.modal-col select {
    width: 100%;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}
.toggle-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
.toggle-text-label {
    cursor: pointer;
    margin-bottom: 0;
}
.toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
    flex-shrink: 0;
}
.toggle-switch input {
    display: none;
}
.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 20px;
    transition: .4s;
}
.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}
.toggle-switch input:checked + .slider {
    background-color: #2271b1;
}
.toggle-switch input:checked + .slider:before {
    transform: translateX(20px);
}

#captions-options {
    margin-bottom: 15px;
}

#captions-options select:first-child {
    margin-bottom: 10px;
}

#custom-subtitle-url-wrapper {
    margin-top: 10px;
}

.modal-col fieldset:disabled, .modal-col select:disabled, .modal-col #captions-options.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.upload-area-container {
    margin: 20px 0;
}

.drag-drop-area {
    border: 2px dashed #b4b9be;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.drag-drop-area:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.drag-drop-area.dragover {
    border-color: #2271b1;
    background: #e6f3ff;
    transform: scale(1.02);
}

.drag-drop-content {
    max-width: 400px;
    margin: 0 auto;
}

.drag-drop-icon {
    font-size: 48px;
    color: #b4b9be;
    margin-bottom: 15px;
}

.drag-drop-area:hover .drag-drop-icon {
    color: #2271b1;
}

.drag-drop-area h3 {
    margin: 0 0 10px 0;
    color: #1d2327;
    font-size: 18px;
}

.drag-drop-area p {
    margin: 5px 0;
    color: #646970;
}

.file-info {
    font-size: 12px;
    margin-top: 15px;
    color: #646970;
}

.file-preview {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.file-preview-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-info-display {
    flex: 1;
}

.file-name {
    display: block;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 5px;
}

.file-size {
    display: block;
    font-size: 12px;
    color: #646970;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin: 10px 0;
}
.progress-bar-fill {
    height: 100%;
    background-color: #2271b1;
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}
#upload-status {
    margin: 16px 0;
    padding: 0;
    border-radius: 4px;
}
.success {
    background-color: transparent;
    color: #1d2327;
    border: none;
    padding: 0;
    margin: 0;
}
.success .fastpix-upload-success {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    color: #1d2327;
    border: 1px solid #e0e0e0;
    border-left: 3px solid #d0d0d0;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 0 auto 24px auto;
    max-width: 800px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}
.success .fastpix-upload-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #d0d0d0, #c0c0c0);
    border-radius: 8px 8px 0 0;
}
.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Connection status indicator */
.connection-status {
    position: fixed;
    top: 32px;
    right: 20px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    z-index: 9999;
    display: none;
}
.connection-status.offline {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}
.connection-status.online {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

/* Upload success styles */
.fastpix-upload-success {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fastpix-single-line-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}
.fastpix-status-section, .fastpix-copy-section {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fastpix-status-label, .fastpix-copy-label {
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}
.fastpix-status-value {
    color: #2271b1;
    font-weight: 600;
    text-transform: capitalize;
    font-size: 14px;
}
.fastpix-status-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-right: 4px;
}
.fastpix-status-icon.processing {
    color: #f39c12;
    animation: rotate 1s linear infinite;
}
.fastpix-status-icon.ready {
    color: #27ae60;
}
.fastpix-status-icon.failed {
    color: #e74c3c;
}
.fastpix-status-icon.default {
    color: #6c757d;
}
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.fastpix-copy-btn {
    background: linear-gradient(135deg, #2271b1 0%, #1e5a8a 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-width: 36px;
    height: 36px;
    box-shadow: 0 2px 4px rgba(34, 113, 177, 0.2);
    position: relative;
    overflow: hidden;
}
.fastpix-copy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.fastpix-copy-btn:hover {
    background: linear-gradient(135deg, #1e5a8a 0%, #135e96 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.3);
}
.fastpix-copy-btn:hover::before {
    left: 100%;
}
.fastpix-copy-btn:active {
    transform: translateY(0);
}
.fastpix-copy-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}
.fastpix-copy-btn.copied {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
}
.fastpix-view-video {
    margin-top: 8px;
}
.fastpix-view-video a {
    text-decoration: none;
    color: #2271b1;
    font-weight: 500;
}
.fastpix-view-video a:hover {
    text-decoration: underline;
}

.view-video-link {
    margin-left: 10px;
    color: #2271b1;
    text-decoration: none;
}
.view-video-link:hover {
    color: #135e96;
    text-decoration: underline;
}

/* Instructions Styling */
.fastpix-instructions-container {
    margin: 20px auto;
    display: flex;
    justify-content: center;
    max-width: 800px;
}

.fastpix-instructions-box {
    width: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e0e0e0;
    border-left: 3px solid #d0d0d0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.fastpix-instructions-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #d0d0d0, #c0c0c0);
    border-radius: 8px 8px 0 0;
}

.fastpix-instructions-title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2271b1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fastpix-instructions-title::before {
    content: '\f537';
    font-family: 'dashicons';
    font-size: 18px;
    color: #2271b1;
}

.fastpix-instructions-content {
    margin: 0;
    line-height: 1.6;
    color: #50575e;
    font-size: 14px;
}

.fastpix-instructions-list {
    margin: 0;
    padding-left: 0;
    list-style-type: none;
}

.fastpix-instructions-item {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #50575e;
    font-size: 14px;
    position: relative;
    padding-left: 28px;
    display: flex;
    align-items: flex-start;
}

.fastpix-instructions-item::before {
    content: '\f147';
    font-family: 'dashicons';
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 16px;
    color: #27ae60;
    width: 20px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fastpix-instructions-item:last-child {
    margin-bottom: 0;
}

/* Support text styling */
.fastpix-support-text a:hover {
    color: #135e96;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fastpix-instructions-box {
        padding: 16px;
        margin: 15px 0;
    }
    
    .success .fastpix-upload-success {
        padding: 14px 16px;
        margin: 0 auto 20px auto;
    }
    
    .fastpix-instructions-title {
        font-size: 15px;
    }
    
    .fastpix-instructions-item,
    .fastpix-instructions-content {
        font-size: 13px;
    }
    
    .fastpix-single-line-row {
        gap: 16px;
    }
    
    .fastpix-status-label, .fastpix-copy-label {
        font-size: 13px;
    }
    
    .fastpix-status-value {
        font-size: 13px;
    }
    
    .fastpix-copy-btn {
        min-width: 32px;
        height: 32px;
        padding: 6px 8px;
    }
    
    .fastpix-support-text {
        bottom: 30px !important;
        right: 10px !important;
        font-size: 11px !important;
    }
}

/* ===============================================
   LOADER AND PROGRESS BAR STYLES
   =============================================== */

.fastpix-loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
}

.fastpix-loader-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.fastpix-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: fastpix-spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes fastpix-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar-fill {
    transition: width 0.3s ease, background-color 0.3s ease;
}

.progress-bar-fill.error {
    background-color: #dc3232 !important;
}

.upload-status.error {
    color: #dc3232;
    font-weight: bold;
}
