/* Virtual Try-On Frontend v5.0.0 */

/* Button */
.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;
}

/* Credits Badge (under button) */
.gvto-credits-badge {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

.gvto-credits-count strong {
    color: #333;
}

.gvto-credits-unlimited {
    color: #667eea;
    font-weight: 600;
}

.gvto-credits-buy-link {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
}

.gvto-credits-buy-link:hover {
    text-decoration: underline;
    color: #764ba2;
}

.gvto-credits-separator {
    color: #ccc;
}

/* Login Prompt (for non-logged users) */
.gvto-login-prompt {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
}

.gvto-login-text {
    margin: 0;
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}

.gvto-login-icon {
    font-size: 20px;
    margin-right: 6px;
}

.gvto-login-link {
    color: #667eea;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.gvto-login-link:hover {
    color: #764ba2;
    border-bottom-color: #764ba2;
}

/* Modal Credits Bar */
.gvto-modal-credits {
    margin-bottom: 20px;
}

.gvto-credits-bar {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 10px 16px;
    text-align: center;
    font-size: 15px;
    color: #2e7d32;
}

.gvto-credits-bar.gvto-credits-empty {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.gvto-credits-bar.gvto-credits-admin {
    background: #e8ecff;
    border-color: #667eea;
    color: #667eea;
}

.gvto-credits-icon {
    margin-right: 6px;
}

.gvto-credits-bar a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

/* Packages Grid */
.gvto-credits-info-text {
    text-align: center;
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.gvto-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 0 auto 20px;
    max-width: 600px;
}

.gvto-package-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
}

.gvto-package-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-4px);
}

.gvto-package-credits {
    font-size: 48px;
    font-weight: 800;
    color: #667eea;
    line-height: 1;
}

.gvto-package-label {
    font-size: 16px;
    color: #999;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gvto-package-price {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.gvto-buy-package-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 30px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.gvto-buy-package-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.5) !important;
}

.gvto-buy-package-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

#gvto-package-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

#gvto-package-loading .gvto-spinner {
    margin: 0 auto 10px;
}

/* 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 0 10px;
    font-size: 15px;
}
.gvto-tips p:last-child {
    margin-bottom: 0;
}

/* Upload */
.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,
.gvto-back-to-step1 {
    background: #e0e0e0 !important;
    color: #333 !important;
}

.gvto-generate-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    border: none !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: 15px;
}

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

.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;
    border: none !important;
    cursor: pointer !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-packages-grid {
        grid-template-columns: 1fr;
    }
    .gvto-login-prompt {
        padding: 12px 15px;
    }
    .gvto-login-text {
        font-size: 14px;
    }
}
