/* =========================================================
   Provalo AI VTON — Frontend Styles
   ========================================================= */

/* ----- Try-On Button (product page) ----- */
.provalo-tryon-wrap {
    margin: 12px 0;
}

.provalo-tryon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: background 0.2s;
}

.provalo-tryon-btn:hover {
    background: #333;
}

.provalo-size-badge {
    font-size: 13px;
    color: #555;
    margin: 0 0 8px;
    padding: 6px 10px;
    background: #f4f4f4;
    border-left: 3px solid #111;
    border-radius: 4px;
}

/* ----- Modal Overlay ----- */
.provalo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.provalo-modal-overlay[hidden] {
    display: none;
}

/* ----- Modal Box ----- */
.provalo-modal {
    background: #fff;
    border-radius: 12px;
    padding: 30px 28px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.provalo-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 4px 8px;
}

.provalo-modal-close:hover {
    color: #111;
}

.provalo-modal-title {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 700;
}

/* ----- States ----- */
.provalo-state[hidden] {
    display: none;
}

.provalo-state p {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}

.provalo-state a {
    color: #111;
    text-decoration: underline;
}

/* ----- Size display ----- */
.provalo-modal-size {
    background: #f0faf0;
    border: 1px solid #b2e0b2;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 14px;
    color: #1a5c1a;
    margin-bottom: 16px;
}

.provalo-modal-size[hidden] {
    display: none;
}

/* ----- Loading ----- */
.provalo-modal-loading {
    text-align: center;
    padding: 20px 0;
    color: #666;
}

.provalo-modal-loading[hidden] {
    display: none;
}

.provalo-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #111;
    border-radius: 50%;
    animation: provalo-spin 0.75s linear infinite;
    margin: 0 auto 14px;
}

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

/* ----- Result image ----- */
.provalo-modal-result {
    text-align: center;
    margin-bottom: 16px;
}

.provalo-modal-result img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

/* ----- Action buttons (modal) ----- */
.provalo-tryon-action-btn,
.provalo-retry-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.provalo-tryon-action-btn {
    background: #111;
    color: #fff;
    margin-top: 8px;
}

.provalo-tryon-action-btn:hover {
    background: #333;
}

.provalo-tryon-action-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

.provalo-retry-btn {
    background: #fff;
    color: #111;
    border: 2px solid #111;
    margin-top: 10px;
}

.provalo-retry-btn:hover {
    background: #f4f4f4;
}

.provalo-retry-btn[hidden] {
    display: none;
}

/* =========================================================
   My Body Profile Page
   ========================================================= */
.provalo-profile-wrap {
    max-width: 860px;
}

.provalo-profile-wrap h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* ----- Notices ----- */
.provalo-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.provalo-notice ul {
    margin: 4px 0 0;
    padding-left: 18px;
}

.provalo-notice--success {
    background: #edf7ed;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.provalo-notice--error {
    background: #fdecea;
    border-left: 4px solid #e53935;
    color: #b71c1c;
}

.provalo-size-highlight {
    font-size: 18px;
}

.provalo-size-banner {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 10px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 15px;
    color: #5d4037;
}

/* ----- Form grid ----- */
.provalo-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media ( max-width: 640px ) {
    .provalo-form-grid {
        grid-template-columns: 1fr;
    }
}

.provalo-form-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #111;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

.provalo-field {
    margin-bottom: 14px;
}

.provalo-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #444;
}

.provalo-field input,
.provalo-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    font-size: 14px;
    background: #fafafa;
    box-sizing: border-box;
}

.provalo-field input:focus,
.provalo-field select:focus {
    outline: none;
    border-color: #111;
    background: #fff;
}

/* ----- Photos ----- */
.provalo-photos-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #111;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

.provalo-photos-section small {
    font-weight: 400;
    color: #888;
    font-size: 12px;
}

.provalo-photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.provalo-photo-slot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 160px;
    flex-shrink: 0;
}

.provalo-slot-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.provalo-slot-label em {
    font-weight: 400;
    font-style: italic;
    color: #888;
    font-size: 11px;
}

/* Card: photo exists */
.provalo-photo-card {
    position: relative;
    width: 160px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.provalo-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.provalo-photo-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(200, 0, 0, 0.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.provalo-photo-delete:hover {
    background: rgba(180, 0, 0, 1);
}

/* Card: no photo — upload placeholder */
.provalo-photo-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 200px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    cursor: pointer;
    color: #999;
    gap: 6px;
    transition: border-color 0.2s, color 0.2s;
    box-sizing: border-box;
}

.provalo-photo-upload:hover {
    border-color: #555;
    color: #555;
}

.provalo-upload-icon {
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
}

.provalo-upload-text {
    font-size: 12px;
    font-weight: 500;
}

.provalo-upload-input {
    display: none;
}

.provalo-hidden {
    display: none !important;
}

@media ( max-width: 600px ) {
    .provalo-photos-grid {
        flex-direction: column;
    }

    .provalo-photo-slot {
        width: 100%;
    }

    .provalo-photo-card,
    .provalo-photo-upload {
        width: 100%;
    }
}

.provalo-save-btn {
    padding: 12px 28px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    background: #111 !important;
    color: #fff !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer !important;
}

.provalo-save-btn:hover {
    background: #333 !important;
}
