/* MAH - Estilos del formulario de submission y dashboard de "mis reportes" */

/* === Pantalla "necesitas cuenta" === */
.mah-form-locked {
    background: #fdead6;
    border: 1px solid #f57921;
    border-radius: 12px;
    padding: 2rem 2.5rem;
    text-align: center;
    margin: 2rem 0;
}
.mah-form-locked-icon {
    font-size: 3rem;
    margin-bottom: .5rem;
}
.mah-form-locked h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: #1B3A2F;
    margin: 0 0 1rem;
}
.mah-form-locked p {
    color: #4a4a4a;
    margin: 0 0 1.2rem;
    line-height: 1.6;
}
.mah-form-locked-reasons {
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    text-align: left;
    margin: 1.5rem auto;
    max-width: 460px;
}
.mah-form-locked-reasons strong {
    color: #1B3A2F;
    display: block;
    margin-bottom: .5rem;
}
.mah-form-locked-reasons ul {
    margin: 0;
    padding-left: 1.2rem;
    color: #4a4a4a;
    font-size: .92rem;
    line-height: 1.7;
}
.mah-form-locked-actions {
    display: flex;
    gap: .8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5rem 0 .5rem;
}
.mah-form-locked-note {
    color: #888;
    font-size: .85rem;
}

/* === Formulario === */
.mah-form-reportar {
    max-width: 720px;
    margin: 2rem 0;
}
.mah-form-greeting {
    background: rgba(245, 121, 33, 0.08);
    border-left: 3px solid #F57921;
    padding: .9rem 1.2rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    color: #4a4a4a;
}
.mah-form-message {
    padding: 1rem 1.4rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: .95rem;
    line-height: 1.6;
}
.mah-form-message.success {
    background: #dcf5e7;
    border-left: 4px solid #2a7a4a;
    color: #1a5535;
}
.mah-form-message.error {
    background: #fde8e8;
    border-left: 4px solid #c44;
    color: #7a1a1a;
}

.mah-form-fieldset {
    border: 1px solid #e0d8c4;
    border-radius: 8px;
    padding: 1.2rem 1.5rem 1.5rem;
    margin-bottom: 1.5rem;
}
.mah-form-fieldset legend {
    font-weight: 700;
    padding: 0 .5rem;
    color: #1B3A2F;
    font-size: .95rem;
}
.mah-form-fieldset legend small {
    font-weight: 400;
    color: #888;
    margin-left: .3rem;
}

.mah-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mah-form-label {
    display: block;
    margin-bottom: 1rem;
}
.mah-form-label > span {
    display: block;
    font-weight: 600;
    color: #1B3A2F;
    margin-bottom: .35rem;
    font-size: .92rem;
}
.mah-form-label > span small {
    font-weight: 400;
    color: #888;
}
.mah-form-label input,
.mah-form-label select,
.mah-form-label textarea {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid #d8d2c0;
    border-radius: 6px;
    font-family: inherit;
    font-size: .95rem;
    background: white;
    transition: border-color .2s;
}
.mah-form-label input:focus,
.mah-form-label select:focus,
.mah-form-label textarea:focus {
    outline: none;
    border-color: #F57921;
    box-shadow: 0 0 0 3px rgba(245, 121, 33, 0.15);
}
.mah-form-label input[type="file"] {
    padding: .5rem;
    background: #fafaf5;
    cursor: pointer;
}
.mah-form-hint {
    display: block;
    margin-top: .35rem;
    color: #888;
    font-size: .82rem;
}

/* Radio cards */
.mah-radio-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem;
    margin-top: .3rem;
}
.mah-radio-card {
    display: block;
    cursor: pointer;
    position: relative;
}
.mah-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.mah-radio-card-content {
    display: block;
    padding: 1rem 1.2rem;
    background: #fafaf5;
    border: 2px solid #e0d8c4;
    border-radius: 8px;
    transition: all .2s;
}
.mah-radio-card-content strong {
    display: block;
    color: #1B3A2F;
    margin-bottom: .3rem;
    font-size: .98rem;
}
.mah-radio-card-content small {
    color: #6a6a6a;
    font-size: .82rem;
    line-height: 1.4;
}
.mah-radio-card input:checked + .mah-radio-card-content {
    background: #fdead6;
    border-color: #F57921;
}
.mah-radio-card:hover .mah-radio-card-content {
    border-color: #f5a565;
}

/* Map picker */
.mah-form-search {
    display: flex;
    gap: .5rem;
    margin-bottom: .8rem;
    align-items: stretch;
}
.mah-form-search input {
    flex: 1;
    padding: .6rem .9rem;
    border: 1.5px solid #d8d2c0;
    border-radius: 6px;
    font-family: inherit;
    font-size: .92rem;
}
.mah-form-search input:focus {
    outline: none;
    border-color: #F57921;
}
#mah_form_search_btn {
    padding: .6rem 1.1rem;
    background: #1B3A2F;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    font-size: .9rem;
    transition: background .2s;
}
#mah_form_search_btn:hover {
    background: #112822;
}
#mah_form_search_btn:disabled {
    opacity: .6;
    cursor: wait;
}
.mah-form-locate {
    width: 100%;
    padding: .7rem;
    background: #fdead6;
    color: #b35012;
    border: 1.5px solid #F57921;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    font-size: .9rem;
    margin-bottom: .8rem;
    transition: all .2s;
}
.mah-form-locate:hover {
    background: #F57921;
    color: white;
}
.mah-form-locate:disabled {
    opacity: .7;
    cursor: wait;
}
#mah_form_map {
    height: 360px;
    width: 100%;
    border-radius: 8px;
    border: 1.5px solid #d8d2c0;
    z-index: 1;
}
.mah-form-coords {
    margin-top: .6rem;
    margin-bottom: 0;
    color: #888;
    text-align: center;
}
.mah-form-coords #mah_form_coords_display {
    font-family: ui-monospace, monospace;
    color: #1B3A2F;
    font-weight: 600;
}

.mah-form-checkbox {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    color: #4a4a4a;
    font-size: .92rem;
    line-height: 1.5;
    cursor: pointer;
}
.mah-form-checkbox input {
    margin-top: 3px;
    flex-shrink: 0;
}

.mah-form-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
    margin-top: .5rem;
}

.mah-form-note {
    text-align: center;
    margin-top: 1.2rem;
    color: #888;
    font-style: italic;
}

/* === "Mis Reportes" Dashboard === */
.mah-mis-reportes {
    margin: 2rem 0;
}
.mah-mis-greeting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(27, 58, 47, 0.05);
    padding: 1rem 1.4rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.mah-mis-logout {
    color: #F57921;
    font-weight: 600;
    text-decoration: none;
    font-size: .9rem;
}
.mah-mis-logout:hover {
    color: #D86813;
}

.mah-mis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.mah-mis-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
}
.mah-mis-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.mah-mis-card-img {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    background: #f5f0e0;
}
.mah-mis-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mah-mis-card-empty {
    display: grid;
    place-items: center;
    height: 100%;
    font-size: 3rem;
    color: #c5b896;
}
.mah-mis-status {
    position: absolute;
    top: .7rem;
    left: .7rem;
    padding: .25rem .7rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: 3px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.mah-mis-status-pub      { background: #2a7a4a; color: white; }
.mah-mis-status-pending  { background: #E8B547; color: #1A1A1A; }
.mah-mis-status-draft    { background: #888; color: white; }

.mah-mis-card-body {
    padding: 1rem 1.2rem 1.3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.mah-mis-tipo {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #F57921;
    margin-bottom: .3rem;
}
.mah-mis-card-body h4 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: #1B3A2F;
    margin: 0 0 .4rem;
    line-height: 1.2;
}
.mah-mis-fecha {
    color: #888;
    font-size: .85rem;
    margin: 0 0 .8rem;
}
.mah-mis-link {
    display: inline-block;
    margin-top: auto;
    color: #1B3A2F;
    font-weight: 600;
    font-size: .88rem;
    border-bottom: 1.5px solid #1B3A2F;
    padding-bottom: 2px;
    text-decoration: none;
    align-self: flex-start;
    transition: color .2s, border-color .2s;
}
.mah-mis-link:hover {
    color: #F57921;
    border-color: #F57921;
}
.mah-mis-pending {
    background: rgba(232, 181, 71, 0.15);
    padding: .6rem .8rem;
    border-radius: 4px;
    margin: 0;
    color: #6a5618;
    line-height: 1.4;
}
.mah-mis-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: #fafaf5;
    border-radius: 8px;
}
.mah-mis-empty-state p {
    color: #888;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

/* Mobile */
@media (max-width: 640px) {
    .mah-form-grid,
    .mah-radio-cards {
        grid-template-columns: 1fr;
    }
    #mah_form_map {
        height: 300px;
    }
    .mah-form-locked {
        padding: 1.5rem;
    }
    .mah-form-locked-actions {
        flex-direction: column;
    }
    .mah-form-locked-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
 * PREVIEW DE FOTOS MÚLTIPLES
 * ============================================ */
.mah-photos-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .6rem;
    margin-top: .8rem;
}
.mah-photo-preview-item {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.mah-photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mah-photo-preview-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: .35rem .6rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: white;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.mah-photos-warning {
    grid-column: 1 / -1;
    background: #fff3cd;
    border-left: 3px solid #E8B547;
    padding: .6rem .9rem;
    border-radius: 4px;
    color: #6a5618;
    font-size: .85rem;
    margin-bottom: .6rem;
}

@media (max-width: 600px) {
    .mah-photos-preview {
        grid-template-columns: repeat(2, 1fr);
    }
}
