/* =========================================================
   "Créer un service" modal (#je-service-create, automoto/servicelist.blade.php)
   and "Modifier le service" (#je-service-edit-modal, automoto/profil.blade.php).
   Built on the shared wizard styles (annonce-wizard.css: head, body, fields, Select2,
   upload zone, errors, footer). Only the service-specific bits are here.
========================================================= */

/* one step, fewer fields than the listing wizard: a little narrower */
.uk-modal-dialog.amp-wz.amp-svc-wz {
    width: 860px;
}

/* single photo preview: thumbnail + file name / size */
.amp-svc-wz .amp-svc-preview {
    display: flex;
    align-items: center;
    gap: 14px;
}

.amp-svc-wz .amp-svc-preview:not(:empty) {
    margin-top: 14px;
    padding: 10px;
    border: 1px solid var(--amp-line);
    border-radius: 12px;
    background: #fff;
}

.amp-svc-wz .amp-svc-preview .amp-upload-thumb {
    flex: none;
    width: 168px;
}

.amp-svc-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.amp-svc-preview-meta strong {
    overflow: hidden;
    color: var(--amp-navy);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.amp-svc-preview-meta span {
    color: var(--amp-muted);
    font-size: 12.5px;
}

/* the photo is set: the zone becomes a compact "replace" strip */
.amp-svc-wz .amp-upload.has-file {
    padding-top: 14px;
    padding-bottom: 14px;
}

.amp-svc-wz .amp-wz-section > .amp-wz-error {
    margin-top: 10px;
}

@media (max-width: 767px) {
    .amp-svc-wz .amp-svc-preview .amp-upload-thumb {
        width: 112px;
    }

    /* "Modifier le service" (profil.blade.php): "Mettre à jour le service" is longer than
       "Publier le service", the main button takes the space left by "Annuler" */
    #je-service-edit-modal .amp-wz-foot-left {
        flex: 0 0 auto;
    }

    #je-service-edit-modal .amp-wz-foot-right {
        flex: 1 1 auto;
    }

    #je-service-edit-modal .amp-wz-btn.is-publish {
        width: 100%;
        padding: 0 14px;
    }
}
