/* ==========================================================================
   Shoe form — Create / Edit
   ==========================================================================
   Estructura: dropzone de foto arriba (o preview existente), grid de
   campos, slider de km con número grande tabular, hint educativo al pie,
   acciones con divider arriba.
   ========================================================================== */

.shoe-form-page {
    padding-bottom: 4rem;
}

@media (max-width: 768px) {
    .shoe-form-page {
        padding-bottom: 2rem;
    }
}

.shoe-form-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

@media (max-width: 575.98px) {
    .shoe-form-card {
        padding: 1.5rem;
    }
}


/* -------------------------------------------------------------------------
   Form actions — divider + cancelar (link) + guardar (primary)
   ------------------------------------------------------------------------- */

.shoe-form__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.shoe-form__cancel {
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: color 180ms ease;
}

.shoe-form__cancel:hover,
.shoe-form__cancel:focus-visible {
    color: var(--primary-color) !important;
}


/* -------------------------------------------------------------------------
   KM slider — número grande + slider con fill dinámico (color via JS)
   ==========================================================================
   El JS de _ShoeFormScripts setea el background del slider con var()
   del tema para respetar dark/light mode.
   ------------------------------------------------------------------------- */

.shoe-km-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.4rem;
    margin: 0.5rem 0 1rem;
}

.shoe-km-display__num {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.shoe-km-display__unit {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.shoe-km-slider {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    outline: none;
    /* Background con var() — el JS lo override con el linear-gradient */
    background: var(--bg-tertiary);
    cursor: pointer;
}

.shoe-km-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--card-bg);
    cursor: pointer;
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 180ms var(--ease-out-strong);
}

.shoe-km-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.shoe-km-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--card-bg);
    cursor: pointer;
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.shoe-km-range {
    display: flex;
    justify-content: space-between;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.shoe-km-hint {
    margin: 1rem 0 0;
    padding: 0.85rem 1rem;
    background-color: var(--bg-tertiary);
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}


/* -------------------------------------------------------------------------
   Sección de foto — dropzone (sin imagen) o card con preview (con imagen)
   ------------------------------------------------------------------------- */

.shoe-photo-section {
    margin-bottom: 1.75rem;
}

/* Dropzone — área dashed clickeable cuando no hay imagen */
.shoe-photo-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 2.5rem 1.5rem;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background-color: transparent;
    cursor: pointer;
    transition: border-color 180ms ease, background-color 180ms ease;
    text-align: center;
}

.shoe-photo-dropzone:hover,
.shoe-photo-dropzone:focus-visible {
    border-color: var(--primary-color);
    background-color: var(--bg-tertiary);
}

.shoe-photo-dropzone__icon {
    font-size: 1.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.shoe-photo-dropzone__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.shoe-photo-dropzone__hint {
    font-size: 0.78rem;
    color: var(--text-muted);
}


/* Card con preview existente — imagen + botón "Cambiar foto" SIEMPRE visible
   (no dependemos de hover, así funciona en mobile) */
.shoe-photo-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bg-tertiary);
    max-height: 260px;
}

.shoe-photo-preview {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: contain;
}

.shoe-photo-change {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 180ms ease;
}

.shoe-photo-change:hover,
.shoe-photo-change:focus-visible {
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
}

.shoe-photo-filename {
    margin: 0.5rem 0 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}
