/* --- 1. The Trigger Button --- */
.vertex-ai-btn {
    background: linear-gradient(135deg, #b9a16b 0%, #53376f 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    margin-bottom:15px;
    width: 100%;
    justify-content: center;
}

.vertex-ai-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
    color: white;
}

/* --- 2. The Modal Backdrop --- */
.vto-modal-backdrop {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Fundal puțin mai întunecat */
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

/* --- 3. The Modal Card (Compact Version) --- */
.vto-modal-card {
    background: #ffffff;
    width: 90%;
    max-width: 450px; /* Puțin mai îngust */
    max-height: 90vh; /* Nu depășește înălțimea ecranului */
    overflow-y: auto; /* Scroll doar dacă e nevoie */
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

.vto-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    z-index: 10;
}

.vto-header {
    background: #f9fafb;
    padding: 15px 20px; /* Padding mai mic */
    border-bottom: 1px solid #eee;
    text-align: center;
    flex-shrink: 0;
}

.vto-header h3 {
    margin: 0;
    color: #111;
    font-size: 18px;
    font-weight: 700;
}

.vto-header p {
    margin: 5px 0 0;
    color: #666;
    font-size: 13px;
}

.vto-body {
    padding: 20px;
    flex-grow: 1;
}

/* --- 4. Upload Zone --- */
.vto-upload-zone {
    margin-bottom: 10px;
}

.vto-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
}

.vto-upload-label:hover {
    border-color: #a855f7;
    background: #f3e8ff;
    color: #6b21a8;
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

/* --- 5. Previews (Compact) --- */
/* Important: Ascuns default, activat de JS */
#preview-container {
    display: none; 
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.vto-img-wrapper {
    position: relative;
    width: 48%; /* Folosește aproape jumătate din spațiu */
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: #eee;
    max-height: 200px; /* Limită de înălțime pentru a fi compact */
}

.vto-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Taie imaginea frumos să umple chenarul */
}

.vto-img-wrapper .badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
}

.vto-plus {
    font-size: 20px;
    color: #ccc;
    font-weight: bold;
}

/* --- 6. Action Button --- */
.vto-action-btn {
    width: 100%;
    padding: 12px;
    background: #111;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.vto-action-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.vto-action-btn:not(:disabled):hover {
    background: #333;
}

/* --- 7. Loading Spinner --- */
.vto-loader {
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #a855f7;
    border-radius: 50%;
    margin: 0 auto 10px;
    animation: spin 1s linear infinite;
}

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

/* --- 8. Final Result --- */
.vto-result {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.vto-final-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.vto-final-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.badge.success {
    background: #10b981;
}

.vto-secondary-btn {
    background: transparent;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: all 0.2s;
}

.vto-secondary-btn:hover {
    border-color: #333;
    color: #111;
}

#vto-add-to-cart-trigger {
    width: 100%;
    margin-top: 15px;
    padding: 15px;
    font-weight: bold;
    text-transform: uppercase;
}



/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}