/* ── Mascota Perdida — Public Form ─────────────────────────── */
.mp-form-wrap {
    max-width: 760px; margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box; overflow-x: hidden;
}
.mp-form-wrap *, .mp-form-wrap *::before, .mp-form-wrap *::after {
    box-sizing: border-box;
}
.mp-form-header {
    background: #601618; color: #fff;
    border-radius: 12px 12px 0 0; padding: 20px 24px;
}
.mp-form-header h2 { margin: 0 0 6px; font-size: 1.4rem; color: #fff; }
.mp-form-header p  { margin: 0; font-size: .88rem; opacity: .85; color: #fff; }

.mp-fieldset { border: none; border-top: 1px solid #f3f4f6; margin: 0; padding: 24px 0 4px; }
.mp-fieldset legend { font-size: 1rem; font-weight: 700; color: #601618; padding: 0 6px 0 0; margin-bottom: 14px; }

.mp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 540px) { .mp-form-grid { grid-template-columns: 1fr; } }
.mp-field { display: flex; flex-direction: column; gap: 5px; }
.mp-field-full { grid-column: 1 / -1; }
.mp-field label { font-size: .85rem; font-weight: 600; color: #374151; }
.mp-required { color: #dc2626; }

.mp-field input, .mp-field select {
    padding: 9px 12px; border: 1.5px solid #d1d5db;
    border-radius: 8px; font-size: .95rem;
    transition: border-color .2s, box-shadow .2s;
    background: #fff; color: #111; width: 100%; box-sizing: border-box;
}
.mp-field input:focus, .mp-field select:focus {
    outline: none; border-color: #601618;
    box-shadow: 0 0 0 3px rgba(96,22,24,.12);
}
.mp-field-hint { font-size: .76rem; color: #9ca3af; margin-top: 3px; }

/* Phone */
.mp-phone-wrap { display: flex; align-items: center; gap: 8px; }
.mp-phone-prefix {
    background: #f3f4f6; border: 1.5px solid #d1d5db;
    border-radius: 8px; padding: 9px 10px;
    font-size: .95rem; font-weight: 600; color: #374151;
    white-space: nowrap; min-width: 52px; text-align: center;
    flex-shrink: 0;
}
.mp-phone-wrap input { flex: 1; }

/* Flag select */
.mp-select-flag-wrap { display: flex; align-items: center; gap: 8px; }
#mp-flag-preview { width: 28px; height: 21px; object-fit: cover; border-radius: 3px; border: 1px solid #e5e7eb; flex-shrink: 0; }
.mp-select-flag-wrap select { flex: 1; }

/* Photo hint */
.mp-photo-hint {
    font-size: .82rem; color: #6b7280;
    background: #fef9f0; border: 1px solid #fcd34d;
    border-radius: 8px; padding: 8px 12px; margin-bottom: 12px;
}

/* Upload area */
.mp-photo-upload-area {
    position: relative; border: 2px dashed #fca5a5;
    border-radius: 12px; background: #fff5f5;
    min-height: 150px; display: flex;
    align-items: center; justify-content: center;
    cursor: pointer; overflow: hidden;
    transition: border-color .2s, background .2s;
}
.mp-photo-upload-area:hover, .mp-photo-upload-area.drag-over {
    border-color: #601618; background: #fee2e2;
}
.mp-photo-placeholder {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; color: #9ca3af; padding: 24px; text-align: center; pointer-events: none;
}
.mp-photo-placeholder p { margin: 0; font-weight: 600; color: #6b7280; }
#mp-foto-input {
    position: absolute; inset: 0; opacity: 0; cursor: pointer;
    width: 100% !important; height: 100% !important;
    padding: 0 !important; border: none !important;
}

/* Crop viewport — proporción 16:9 */
.mp-crop-wrap { margin-bottom: 12px; touch-action: none; -ms-touch-action: none; }
.mp-crop-viewport {
    position: relative; width: 100%;
    /* height set by JS */
    overflow: hidden;
    border: 2px solid #601618; border-radius: 10px;
    background: #111; cursor: grab;
    user-select: none; -webkit-user-select: none;
    touch-action: none; -ms-touch-action: none;
}
.mp-crop-viewport:active { cursor: grabbing; }
.mp-crop-viewport img {
    position: absolute;
    display: block;
    max-width: none;   /* evita que el tema/WP fuerce max-width:100% y deforme la imagen */
    max-height: none;
    width: auto;        /* el ancho/alto real lo fija el JS en línea (px) */
    height: auto;
    pointer-events: none;
    touch-action: none; -ms-touch-action: none;
    will-change: left, top, width, height;
}
.mp-crop-controls {
    display: flex; align-items: center; gap: 10px; margin-top: 10px;
}
.mp-zoom-slider {
    flex: 1 1 auto; min-width: 0; max-width: 100%; box-sizing: border-box;
    height: 6px; -webkit-appearance: none; appearance: none;
    background: #d1d5db; border-radius: 3px; outline: none; cursor: pointer;
    touch-action: none; margin: 0;
}
.mp-zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 20px; height: 20px;
    border-radius: 50%; background: #601618; cursor: pointer; border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.mp-zoom-slider::-moz-range-thumb {
    width: 20px; height: 20px; border-radius: 50%;
    background: #601618; cursor: pointer; border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.mp-btn-icon {
    background: #601618; color: #fff; border: none;
    border-radius: 8px; width: 36px; height: 36px;
    font-size: 1.2rem; cursor: pointer; font-weight: 700;
    transition: background .15s;
}
.mp-btn-icon:hover { background: #4a1012; }
.mp-crop-hint { font-size: .78rem; color: #9ca3af; margin: 6px 0 0; }

/* Cambiar imagen */
.mp-btn-secondary {
    background: #f3f4f6; color: #374151;
    border: 1.5px solid #d1d5db; border-radius: 8px;
    padding: 7px 16px; font-size: .88rem; font-weight: 600;
    cursor: pointer; transition: background .2s;
}
.mp-btn-secondary:hover { background: #e5e7eb; }

/* Legal */
.mp-legal-check { padding: 18px 0 8px; border-top: 1px solid #f3f4f6; margin-top: 8px; }
.mp-check-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .88rem; color: #374151; line-height: 1.5; }
.mp-check-label input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; margin-top: 2px; accent-color: #601618; cursor: pointer; }
.mp-check-label a { color: #601618; }

/* Messages */
.mp-messages { border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: .9rem; }
.mp-messages.mp-error-box { background: #fee2e2; border: 1px solid #fca5a5; color: #7f1d1d; }
.mp-messages ul { margin: 6px 0 0 18px; padding: 0; }

/* Submit */
.mp-submit-area { padding: 20px 0 8px; text-align: center; }
.mp-btn-submit {
    background: #601618; color: #fff; border: none;
    border-radius: 10px; padding: 13px 40px;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    transition: background .2s, transform .15s; min-width: 200px;
}
.mp-btn-submit:hover:not(:disabled) { background: #4a1012; transform: translateY(-1px); }
.mp-btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Success */
.mp-success-state { text-align: center; padding: 60px 20px; }
.mp-success-icon  { font-size: 4rem; margin-bottom: 16px; }
.mp-success-state h3 { font-size: 1.6rem; color: #15803d; margin-bottom: 10px; }
.mp-success-state p  { font-size: 1rem; color: #374151; }
