/**
 * Runway WP Frontend Styles
 * 
 * @package Runway_WP
 */

.runway-wp-generator {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

.runway-wp-generator h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 600;
}

.runway-wp-generator p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Form Styles */
.runway-wp-form-group {
    margin-bottom: 20px;
}

.runway-wp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.runway-wp-form-group input[type="file"],
.runway-wp-form-group textarea,
.runway-wp-form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.runway-wp-form-group input[type="file"]:focus,
.runway-wp-form-group textarea:focus,
.runway-wp-form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.runway-wp-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Button Styles */
.runway-wp-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.runway-wp-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.runway-wp-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.runway-wp-button-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.runway-wp-button-secondary:hover {
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.3);
}

/* Status Messages */
.runway-wp-status {
    margin: 20px 0;
}

.runway-wp-loading,
.runway-wp-success,
.runway-wp-error {
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: 500;
}

.runway-wp-loading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.runway-wp-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading-shimmer 2s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.runway-wp-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.runway-wp-error {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

/* Video Result Styles */
.runway-wp-video-result {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.runway-wp-video-result h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.runway-wp-video-result video {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.runway-wp-video-actions {
    text-align: center;
}

/* User Videos Grid */
.runway-wp-user-videos {
    margin: 40px 0;
}

.runway-wp-user-videos h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.runway-wp-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.runway-wp-video-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.runway-wp-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.runway-wp-video-preview {
    position: relative;
    overflow: hidden;
}

.runway-wp-video-preview video,
.runway-wp-video-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.runway-wp-video-placeholder {
    position: relative;
    height: 150px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.runway-wp-video-placeholder img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.runway-wp-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.runway-wp-video-info {
    padding: 15px;
}

.runway-wp-video-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.runway-wp-video-info strong {
    color: #333;
}

.runway-wp-delete-video {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.runway-wp-delete-video:hover {
    background: #c82333;
}

/* Image Preview */
#runway-wp-image-preview {
    margin-top: 10px;
}

#runway-wp-image-preview img {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .runway-wp-generator {
        padding: 15px;
    }
    
    .runway-wp-videos-grid {
        grid-template-columns: 1fr;
    }
    
    .runway-wp-form-group input[type="file"],
    .runway-wp-form-group textarea,
    .runway-wp-form-group select {
        padding: 10px;
    }
    
    .runway-wp-button {
        width: 100%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .runway-wp-generator h3 {
        font-size: 20px;
    }
    
    .runway-wp-video-result {
        padding: 15px;
    }
    
    .runway-wp-video-info {
        padding: 12px;
    }
}

/* Loading Animation */
.runway-wp-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* Accessibility */
.runway-wp-button:focus,
.runway-wp-form-group input:focus,
.runway-wp-form-group textarea:focus,
.runway-wp-form-group select:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .runway-wp-generator {
        border: 2px solid #000;
    }
    
    .runway-wp-button {
        border: 2px solid #000;
    }
} 