/* =====================================================================
   MySportOkaz – Frontend form styles
   ===================================================================== */

.msok-form-wrap {
    max-width: 760px;
    margin: 0 auto;
    font-size: 15px;
    color: #333;
}

/* Notices */
.msok-notice {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.msok-notice p {
    margin: 0;
}

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

.msok-notice-error {
    background: #fdecea;
    border: 1px solid #f44336;
    color: #b71c1c;
}

/* Fieldsets */
.msok-fieldset {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 24px 24px 16px;
    margin-bottom: 28px;
}

.msok-legend {
    font-size: 17px;
    font-weight: 700;
    padding: 0 8px;
    color: #1a73e8;
}

/* Fields */
.msok-field {
    margin-bottom: 18px;
}

.msok-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #444;
}

.msok-field-required label span[aria-hidden] {
    color: #d32f2f;
    margin-left: 2px;
}

.msok-field input[type="text"],
.msok-field input[type="number"],
.msok-field input[type="email"],
.msok-field input[type="tel"],
.msok-field select,
.msok-field textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    background: #fff;
    color: #333;
    transition: border-color 0.15s;
}

.msok-field input:focus,
.msok-field select:focus,
.msok-field textarea:focus {
    border-color: #1a73e8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.18);
}

.msok-field textarea {
    resize: vertical;
    min-height: 120px;
}

.msok-field-hint {
    margin: 6px 0 0;
    font-size: 13px;
    color: #777;
}

/* Groups */
.msok-group {
    margin-top: 4px;
}

.msok-separator {
    border: none;
    border-top: 1px solid #eee;
    margin: 16px 0 20px;
}

.msok-group-title {
    font-weight: 700;
    font-size: 14px;
    color: #555;
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Submit */
.msok-submit-wrap {
    margin-top: 8px;
}

.msok-btn-submit {
    display: inline-block;
    padding: 13px 32px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.msok-btn-submit:hover,
.msok-btn-submit:focus {
    background: #1558b0;
    outline: none;
}

.msok-btn-submit:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* Responsive */
@media ( max-width: 600px ) {
    .msok-fieldset {
        padding: 16px 14px 10px;
    }

    .msok-btn-submit {
        width: 100%;
        text-align: center;
    }
}

/* =====================================================================
   Contact-vendor box (single product page)
   ===================================================================== */

.msok-contact-box {
    border: 2px solid #1a73e8;
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
    background: #fff;
}

.msok-contact-box__title {
    font-size: 18px;
    font-weight: 700;
    color: #1a73e8;
    margin: 0 0 16px;
}

.msok-contact-box__name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    margin: 0 0 10px;
}

.msok-contact-box__tel,
.msok-contact-box__email {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    margin: 0 0 8px;
}

.msok-contact-box__tel {
    display: flex;
}

.msok-contact-box__email {
    display: flex;
}
.msok-field-readonly {
    background-color: #bfbebe6e !important;
    cursor: not-allowed !important;
}

.msok-contact-box__tel svg,
.msok-contact-box__email svg {
    fill: #1a73e8;
    flex-shrink: 0;
}

.msok-contact-box__tel:hover,
.msok-contact-box__email:hover {
    color: #1a73e8;
}

/* Toggle button */
.msok-contact-box__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 11px 22px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.msok-contact-box__toggle svg {
    fill: #fff;
    flex-shrink: 0;
}

.msok-contact-box__toggle:hover,
.msok-contact-box__toggle:focus {
    background: #1558b0;
    outline: none;
}

/* Message form */
.msok-msg-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e8eaf0;
}

.msok-msg-form__notice {
    margin-bottom: 16px;
}

.msok-btn-contact {
    background: #1a73e8;
}

.msok-btn-contact:hover,
.msok-btn-contact:focus {
    background: #1558b0;
}

@media ( max-width: 600px ) {
    .msok-contact-box {
        padding: 16px;
    }

    .msok-contact-box__toggle {
        width: 100%;
        justify-content: center;
    }
}

/* ── Photos existantes (mode édition) ──────────────────────── */
.msok-existing-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.msok-existing-photo {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.msok-existing-photo img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #ddd;
    transition: border-color 0.2s, opacity 0.2s;
    display: block;
}

/* Featured state */
.msok-existing-photo.is-featured img {
    border-color: #f5a623;
}

/* Deleted state */
.msok-existing-photo.is-deleted img {
    border-color: #e8461e;
    opacity: 0.4;
}

/* "À la une" badge */
.msok-existing-photo__badge {
    position: absolute;
    bottom: 22px;
    left: 0;
    right: 0;
    text-align: center;
    background: rgba(245, 166, 35, 0.9);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 4px;
    line-height: 1.4;
    pointer-events: none;
}

/* Controls bar (star + delete) */
.msok-existing-photo__controls {
    display: flex;
    gap: 0;
    width: 80px;
}

.msok-existing-photo__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
    cursor: pointer;
    background: #f5f5f5;
    border: 1px solid #ddd;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.msok-existing-photo__btn:first-child {
    border-radius: 0 0 0 6px;
    border-right: none;
}

.msok-existing-photo__btn:last-child {
    border-radius: 0 0 6px 0;
}

.msok-existing-photo__btn input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* Star button */
.msok-existing-photo__btn--star {
    color: #aaa;
}

.msok-existing-photo__btn--star:hover,
.msok-existing-photo.is-featured .msok-existing-photo__btn--star {
    background: #fff8ec;
    color: #f5a623;
}

/* Delete button */
.msok-existing-photo__btn--delete {
    color: #aaa;
}

.msok-existing-photo__btn--delete:hover,
.msok-existing-photo.is-deleted .msok-existing-photo__btn--delete {
    background: #fdecea;
    color: #e8461e;
}

/* ── Prévisualisation nouvelles photos ──────────────────────── */
.msok-photos-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.msok-photo-preview-item {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.msok-photo-preview-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #ddd;
    display: block;
}

.msok-photo-preview-item.is-featured img {
    border-color: #f5a623;
}

.msok-preview-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    background: rgba(245, 166, 35, 0.9);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 0 0 4px 4px;
    line-height: 1.4;
    pointer-events: none;
}
