/**
 * VMO Media Integration Specialist - Styles
 * Custom styling for the media integration modal and interface
 */

/* Media Integration Modal */
#vmo-media-integration-modal .vmo-modal-content {
    max-width: 800px;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.vmo-media-integration-content .vmo-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.vmo-media-integration-content .vmo-modal-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
}

.vmo-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.vmo-modal-close:hover {
    opacity: 1;
}

/* Media Preview Section */
.vmo-media-preview {
    padding: 30px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    margin-bottom: 30px;
}

.vmo-media-preview-container {
    background: white;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-bottom: 15px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.vmo-media-preview-container:has(img), 
.vmo-media-preview-container:has(video) {
    border-style: solid;
    border-color: #667eea;
    background: #f8f9ff;
}

#vmo-preview-placeholder {
    color: #6c757d;
    font-size: 1.1em;
    font-weight: 500;
}

.vmo-media-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: #6c757d;
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.vmo-media-info span:first-child {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8em;
}

/* Integration Prompt Section */
.vmo-integration-prompt {
    padding: 0 30px 30px;
}

.vmo-integration-prompt label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    font-size: 1.1em;
}

#vmo-integration-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 1em;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

#vmo-integration-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Prompt Suggestions */
.vmo-prompt-suggestions {
    margin-top: 15px;
}

.vmo-suggestions-label {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

#vmo-suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vmo-suggestion-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.vmo-suggestion-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.vmo-suggestion-tag:active {
    transform: translateY(0);
}

/* Advanced Options */
.vmo-advanced-options {
    padding: 0 30px 30px;
}

.vmo-toggle-advanced {
    background: none;
    border: none;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    font-size: 1em;
    padding: 10px 0;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vmo-toggle-advanced:hover {
    color: #5a67d8;
}

.vmo-toggle-icon {
    transition: transform 0.2s;
}

.vmo-advanced-panel {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.vmo-option-group label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.vmo-option-group select,
.vmo-option-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9em;
    transition: border-color 0.3s;
}

.vmo-option-group select:focus,
.vmo-option-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Cost Display */
.vmo-cost-display {
    padding: 0 30px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff3cd;
    margin: 0 30px 30px;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.vmo-cost-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vmo-cost-label {
    font-weight: 600;
    color: #856404;
}

.vmo-cost-amount {
    background: #ffc107;
    color: #856404;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.9em;
}

.vmo-balance-info {
    color: #856404;
    font-weight: 500;
}

/* Modal Footer */
.vmo-media-integration-content .vmo-modal-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-top: 1px solid #dee2e6;
}

.vmo-btn-secondary,
.vmo-btn-primary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    min-width: 140px;
}

.vmo-btn-secondary {
    background: #6c757d;
    color: white;
}

.vmo-btn-secondary:hover {
    background: #5a6268;
}

.vmo-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.vmo-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.vmo-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.vmo-btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Spinner Animation */
.vmo-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: vmo-spin 1s linear infinite;
}

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

/* Media Placeholder for unknown types */
.vmo-media-placeholder {
    font-size: 3em;
    color: #adb5bd;
    padding: 40px;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    background: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 768px) {
    #vmo-media-integration-modal .vmo-modal-content {
        width: 95vw;
        margin: 20px auto;
    }
    
    .vmo-media-preview,
    .vmo-integration-prompt,
    .vmo-advanced-options {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .vmo-media-integration-content .vmo-modal-header,
    .vmo-media-integration-content .vmo-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .vmo-advanced-panel {
        grid-template-columns: 1fr;
    }
    
    .vmo-cost-display {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
        margin-left: 20px;
        margin-right: 20px;
    }
    
    #vmo-suggestion-tags {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .vmo-media-integration-content .vmo-modal-footer {
        flex-direction: column;
    }
    
    .vmo-btn-secondary,
    .vmo-btn-primary {
        width: 100%;
    }
}

/* Integration Success Animations */
.vmo-media-integration {
    animation: vmo-integration-fadeIn 0.6s ease-out;
}

@keyframes vmo-integration-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* WordPress Media Library Integration Button */
.media-modal .vmo-integrate-media {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: #667eea !important;
    color: white !important;
    margin-left: 10px;
    transition: all 0.2s;
}

.media-modal .vmo-integrate-media:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3) !important;
}
