/* Gemini Virtual Try-On v4.1 - Frontend Styles */

/* Button Wrapper */
.gvto-button-wrapper {
    margin: 15px 0;
    clear: both;
}

.gvto-open-modal {
    background: #000 !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    width: auto !important;
    text-align: center !important;
}

.gvto-open-modal:hover {
    background: #333 !important;
    opacity: 0.9 !important;
}

/* Modal */
.gvto-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: gvtoFadeIn 0.3s ease;
}

.gvto-modal.active {
    display: block;
}

@keyframes gvtoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gvto-modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    position: relative;
    animation: gvtoSlideIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes gvtoSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.gvto-close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.gvto-close:hover { color: #000; }

.gvto-modal-title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

/* Steps */
.gvto-step { display: none; }
.gvto-step.active { display: block; }

/* Instructions */
.gvto-instructions h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 20px;
}

.gvto-instruction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gvto-instruction-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 12px;
    border: 2px solid #e8ecff;
    transition: all 0.3s ease;
}

.gvto-instruction-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.gvto-instruction-icon { font-size: 32px; line-height: 1; }
.gvto-instruction-text strong { display: block; color: #333; margin-bottom: 5px; font-size: 15px; }
.gvto-instruction-text p { margin: 0; color: #666; font-size: 13px; line-height: 1.5; }

.gvto-tips {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.gvto-tips p { margin: 0; font-size: 15px; }

/* Upload Zone */
.gvto-upload-zone { text-align: center; margin-top: 40px; }

.gvto-upload-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 40px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.gvto-upload-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.gvto-upload-icon { font-size: 24px; }
.gvto-upload-note { margin-top: 15px; color: #666; font-size: 13px; }

/* Preview */
.gvto-preview-container { text-align: center; margin: 30px 0; }

.gvto-preview-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.gvto-preview-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.gvto-preview-actions button {
    padding: 12px 30px !important;
    font-size: 16px !important;
    border-radius: 50px !important;
}

.gvto-back-button { background: #e0e0e0 !important; color: #333 !important; }
.gvto-generate-button { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; color: #fff !important; }

/* Loading */
.gvto-loading { text-align: center; padding: 60px 20px; }

.gvto-spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #667eea;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: gvtoSpin 1s linear infinite;
    margin: 0 auto 30px;
}

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

.gvto-loading-title { color: #667eea; font-size: 24px; margin-bottom: 20px; }

/* ============================================= */
/* PROGRESS BAR                                  */
/* ============================================= */

.gvto-progress-bar {
    max-width: 400px;
    margin: 0 auto 25px;
}

.gvto-progress-track {
    width: 100%;
    height: 12px;
    background: #e8ecff;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.gvto-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    animation: gvtoProgressShimmer 2s linear infinite;
    position: relative;
}

@keyframes gvtoProgressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.gvto-progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 14px;
}

.gvto-progress-percent {
    color: #667eea;
    font-weight: 700;
    font-size: 16px;
}

.gvto-elapsed-time {
    color: #999;
    font-size: 13px;
}

/* ============================================= */

.gvto-loading-text {
    color: #666;
    font-size: 16px;
    margin-bottom: 10px;
    min-height: 24px;
}

.gvto-loading-subtext {
    color: #999;
    font-size: 14px;
}

/* Result */
.gvto-result-container { text-align: center; margin: 30px 0; }

.gvto-result-image img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.gvto-result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

.gvto-result-actions button {
    padding: 12px 30px !important;
    font-size: 16px !important;
    border-radius: 50px !important;
}

.gvto-download-button { background: #4caf50 !important; color: white !important; }
.gvto-try-again-button { background: #667eea !important; color: white !important; }

/* Error */
.gvto-error { text-align: center; padding: 60px 20px; }
.gvto-error-icon { font-size: 80px; margin-bottom: 20px; }
.gvto-error-title { color: #e53935; font-size: 24px; margin-bottom: 15px; }
.gvto-error-message { color: #666; font-size: 16px; margin-bottom: 30px; }

/* Responsive */
@media (max-width: 768px) {
    .gvto-modal-content { width: 95%; padding: 20px; margin: 5% auto; }
    .gvto-modal-title { font-size: 22px; }
    .gvto-instruction-grid { grid-template-columns: 1fr; }
    .gvto-preview-actions, .gvto-result-actions { flex-direction: column; }
    .gvto-preview-actions button, .gvto-result-actions button { width: 100%; }
    .gvto-progress-bar { max-width: 100%; }
}
