/* AI Image Describer WordPress Plugin Styles */

#ai-image-describer-app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.aid-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
}

/* Header */
.aid-header {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
}

.aid-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(45deg, #3b82f6, #6366f1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    color: white;
}

.aid-title h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
    color: #1e293b;
}

.aid-title p {
    margin: 0;
    font-size: 16px;
    color: #64748b;
}

/* Upload Section */
.aid-upload-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.aid-upload-section h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.aid-upload-section > p {
    margin: 0 0 24px 0;
    color: #64748b;
}

.aid-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    position: relative;
}

.aid-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.aid-upload-content {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.aid-upload-area:hover {
    border-color: #3b82f6;
    background: #f1f5f9;
}

.aid-upload-area.dragging {
    border-color: #3b82f6;
    background: #eff6ff;
}

.aid-upload-area.processing {
    cursor: not-allowed;
    opacity: 0.6;
}

.aid-upload-icon {
    color: #94a3b8;
    margin-bottom: 16px;
}

.aid-upload-text {
    font-size: 18px;
    font-weight: 500;
    color: #374151;
    margin: 0 0 8px 0;
}

.aid-upload-subtext {
    color: #6b7280;
    margin: 0 0 16px 0;
}

.aid-browse-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    pointer-events: all;
}

.aid-browse-btn:hover {
    background: #2563eb;
}

.aid-upload-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.aid-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.aid-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    color: #dc2626;
    display: flex;
    align-items: center;
}

.aid-error-message::before {
    content: "⚠️";
    margin-right: 8px;
}

/* Options Section */
.aid-options-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.aid-options-section h3 {
    margin: 0 0 24px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.aid-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.aid-option {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.aid-option:hover {
    border-color: #3b82f6;
}

.aid-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.aid-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.aid-option label {
    display: block;
    cursor: pointer;
    padding-left: 28px;
    position: relative;
}

.aid-option label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background: white;
}

.aid-option.selected label::before {
    border-color: #3b82f6;
}

.aid-option.selected label::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 6px;
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
}

.aid-option label strong {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.aid-option label span {
    display: block;
    font-size: 14px;
    color: #64748b;
    line-height: 1.4;
}

/* Results Section */
.aid-results-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.aid-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.aid-results-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.aid-success-indicator {
    display: flex;
    align-items: center;
    color: #16a34a;
    font-size: 14px;
    font-weight: 500;
}

.aid-success-indicator svg {
    margin-right: 8px;
}

.aid-image-preview {
    display: flex;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 32px;
}

.aid-image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.aid-descriptions {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.aid-description-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 24px;
    position: relative;
}

.aid-description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.aid-description-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.aid-copy-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.aid-copy-btn:hover {
    background: #e2e8f0;
}

.aid-copy-btn.copied {
    background: #dcfce7;
    color: #16a34a;
    border-color: #bbf7d0;
}

.aid-description-content {
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
    margin: 0;
}

.aid-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.aid-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aid-btn-primary {
    background: #6366f1;
    color: white;
}

.aid-btn-primary:hover {
    background: #5b21b6;
}

.aid-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.aid-btn-secondary:hover {
    background: #e2e8f0;
}

/* Features Section */
.aid-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 64px;
}

.aid-feature {
    text-align: center;
}

.aid-feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.aid-feature-icon-blue {
    background: #dbeafe;
    color: #3b82f6;
}

.aid-feature-icon-green {
    background: #dcfce7;
    color: #16a34a;
}

.aid-feature-icon-purple {
    background: #f3e8ff;
    color: #a855f7;
}

.aid-feature h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.aid-feature p {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    #ai-image-describer-app {
        padding: 16px;
    }
    
    .aid-container {
        padding: 16px;
    }
    
    .aid-upload-section,
    .aid-options-section,
    .aid-results-section {
        padding: 24px;
    }
    
    .aid-upload-area {
        padding: 32px 16px;
    }
    
    .aid-options-grid {
        grid-template-columns: 1fr;
    }
    
    .aid-actions {
        flex-direction: column;
    }
    
    .aid-features {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .aid-header {
        flex-direction: column;
        text-align: center;
    }
    
    .aid-icon {
        margin-right: 0;
        margin-bottom: 16px;
    }
}

/* WordPress admin styling compatibility */
.wp-admin #ai-image-describer-app {
    margin: 20px 0;
}

/* Print styles */
@media print {
    .aid-upload-section,
    .aid-options-section,
    .aid-actions,
    .aid-features {
        display: none;
    }
    
    .aid-results-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}