/**
 * ce.css
 *
 * CSS único de Centros Educativos (sin Tailwind): listado con buscador/filtros,
 * paginadores, ficha individual y, al final, el repetidor de los meta boxes del admin.
 * Todo está prefijado con .ce- para no pisar estilos del theme.
 */

.ce-main
{
    --ce-blue: #164194;
    --ce-cyan: #00aeef;
    --ce-cyan-2: #0088cc;
    --ce-cyan-3: #009bdb;
    --ce-black: #231f20;

    box-sizing: border-box;
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
    background: #fff;
    font-family: 'Montserrat', sans-serif;
    color: var(--ce-black);
}

.ce-main *,
.ce-main *::before,
.ce-main *::after
{
    box-sizing: border-box;
}

@media (min-width: 768px)
{
    .ce-main
    {
        margin: 1.25rem auto;
        padding: 2rem;
        border-radius: 0.5rem;
    }
}

@media (min-width: 1280px)
{
    .ce-main
    {
        max-width: 1100px;
    }
}

@media (min-width: 1536px)
{
    .ce-main
    {
        max-width: 1350px;
    }
}

/* breadcrumb */
.ce-breadcrumb
{
    margin-bottom: 1.5rem;
}

.ce-breadcrumb ol
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
}

.ce-breadcrumb a
{
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.ce-breadcrumb a:hover
{
    color: var(--ce-cyan);
}

.ce-breadcrumb .ce-current
{
    color: var(--ce-cyan);
    font-weight: 600;
}

/* introducción */
.ce-intro
{
    margin-bottom: 2.5rem;
}

.ce-title
{
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--ce-blue);
}

.ce-subtitle
{
    margin: 0.5rem 0 0;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--ce-black);
}

@media (min-width: 768px)
{
    .ce-title,
    .ce-subtitle
    {
        font-size: 1.5rem;
    }
}

.ce-lead
{
    max-width: 48rem;
    margin: 0.75rem 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: #6b7280;
}

.ce-note
{
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    background: #fffbeb;
    border-left: 4px solid #fbbf24;
    border-radius: 0 0.5rem 0.5rem 0;
}

.ce-note-title
{
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    color: #78350f;
}

.ce-note ul
{
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    list-style: disc;
    font-size: 11px;
    font-weight: 500;
    color: #92400e;
}

.ce-note li
{
    margin-top: 0.25rem;
}

/* filtros */
.ce-filters
{
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--ce-cyan-3);
    border-radius: 0.75rem;
    color: #fff;
}

@media (min-width: 768px)
{
    .ce-filters
    {
        flex-direction: row;
        align-items: flex-end;
        padding: 1.5rem;
    }
}

.ce-field
{
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

@media (min-width: 768px)
{
    .ce-field-depto
    {
        width: 14rem;
    }

    .ce-field-name
    {
        flex: 1;
    }
}

.ce-field label
{
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ce-field select,
.ce-field input
{
    height: 2.5rem;
    width: 100%;
    padding: 0 0.75rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 12px;
    color: var(--ce-black);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ce-field select
{
    font-weight: 600;
    cursor: pointer;
}

.ce-field input::placeholder
{
    color: #d1d5db;
}

.ce-field select:focus,
.ce-field input:focus
{
    border-color: var(--ce-cyan);
    box-shadow: 0 0 0 1px rgba(0, 174, 239, 0.2);
}

.ce-btn-filter
{
    flex-shrink: 0;
    height: 2.5rem;
    padding: 0 1.5rem;
    background: var(--ce-cyan);
    border: 0;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.ce-btn-filter:hover
{
    background: var(--ce-cyan-2);
}

/* listado */
.ce-list
{
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ce-msg
{
    padding: 3rem 0;
    text-align: center;
    font-size: 12px;
    font-style: italic;
    color: #9ca3af;
}

.ce-msg-error
{
    color: #f87171;
}

.ce-card
{
    padding: 1.25rem;
    background: #f0f8ff;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

@media (min-width: 768px)
{
    .ce-card
    {
        padding: 1.5rem;
    }
}

.ce-card:hover
{
    border-color: rgba(0, 174, 239, 0.2);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ce-regional
{
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ce-cyan);
}

.ce-ico-pin
{
    width: 0.75rem;
    height: 0.75rem;
}

.ce-card-title
{
    margin: 0.5rem 0 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.375;
    color: var(--ce-black);
}

@media (min-width: 768px)
{
    .ce-card-title
    {
        font-size: 14px;
    }
}

.ce-card-title a
{
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.ce-card-title a:hover
{
    color: var(--ce-cyan-2);
}

.ce-card-datos
{
    margin-top: 0.5rem;
    font-size: 12px;
    color: #4b5563;
}

.ce-card-datos p
{
    margin: 0.25rem 0 0;
}

.ce-card-datos span
{
    font-weight: 600;
}

.ce-card-actions,
.ce-ficha-actions
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.ce-btn-maps,
.ce-btn-ficha,
.ce-btn-back
{
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.ce-btn-maps
{
    background: rgba(0, 174, 239, 0.6);
    color: #fff;
}

.ce-btn-maps:hover
{
    background: var(--ce-cyan-2);
}

.ce-btn-ficha
{
    background: var(--ce-blue);
    color: #fff;
}

.ce-btn-ficha:hover
{
    background: var(--ce-cyan-2);
}

.ce-btn-back
{
    background: transparent;
    color: var(--ce-blue);
}

.ce-btn-back:hover
{
    color: var(--ce-cyan-2);
}

.ce-ico-maps
{
    height: 1.25rem;
    width: 1.25rem;
}

/* paginadores */
.ce-pag
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.ce-pag-top
{
    margin: 2.5rem 0 1rem;
}

.ce-pag-bottom
{
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.ce-pag-info
{
    margin: 0;
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
}

.ce-pag-info strong
{
    color: var(--ce-black);
}

.ce-pag-nav
{
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ce-pg
{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 11px;
    color: #d1d5db;
}

button.ce-pg
{
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.2s;
}

button.ce-pg:hover
{
    background: #f3f4f6;
}

.ce-pg-active
{
    font-weight: 700;
    background: var(--ce-cyan);
    color: #fff;
}

.ce-pg-disabled
{
    cursor: not-allowed;
}

/* ficha */
.ce-ficha
{
    max-width: 48rem;
    padding: 1.5rem;
    background: #f0f8ff;
    border-radius: 0.75rem;
}

@media (min-width: 768px)
{
    .ce-ficha
    {
        padding: 2rem;
    }
}

.ce-ficha-title
{
    margin: 0.5rem 0 0;
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: var(--ce-blue);
}

@media (min-width: 768px)
{
    .ce-ficha-title
    {
        font-size: 1.75rem;
    }
}

.ce-ficha-datos
{
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem 1rem;
    margin: 1.25rem 0 0;
    font-size: 13px;
}

@media (min-width: 640px)
{
    .ce-ficha-datos
    {
        grid-template-columns: max-content 1fr;
    }
}

.ce-ficha-datos dt
{
    margin-top: 0.5rem;
    font-weight: 700;
}

.ce-ficha-datos dd
{
    margin: 0;
    color: #4b5563;
}

@media (min-width: 640px)
{
    .ce-ficha-datos dt
    {
        margin-top: 0;
    }
}

.ce-ficha-datos a
{
    color: var(--ce-cyan-2);
}

.ce-ficha-actions
{
    margin-top: 1.5rem;
}


/* ---------------------------------------------------------------------------
 * Admin: repetidor de centros en los meta boxes
 * ------------------------------------------------------------------------ */
.ce-adm-bar
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ce-adm-search
{
    flex: 1;
    min-width: 200px;
}

.ce-adm-count
{
    color: #646970;
}

.ce-adm-count-err
{
    color: #b32d2e;
    font-weight: 600;
}

.ce-adm-list
{
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #dcdcde;
}

.ce-adm-row
{
    border-bottom: 1px solid #dcdcde;
    background: #fff;
}

.ce-adm-row[hidden]
{
    display: none;
}

.ce-adm-row-err
{
    background: #fcf0f1;
}

.ce-adm-summary
{
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
}

.ce-adm-name
{
    font-weight: 600;
}

.ce-adm-path
{
    color: #646970;
    font-size: 12px;
}

.ce-adm-err
{
    color: #b32d2e;
    font-size: 12px;
    font-weight: 600;
}

.ce-adm-body
{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    padding: 12px;
    border-top: 1px solid #f0f0f1;
}

.ce-adm-field
{
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ce-adm-field-wide
{
    grid-column: 1 / -1;
}

.ce-adm-label
{
    font-size: 12px;
    font-weight: 600;
}

.ce-adm-field input,
.ce-adm-field select
{
    width: 100%;
    max-width: none;
}

.ce-adm-hint
{
    color: #646970;
    font-size: 11px;
}

.ce-adm-remove
{
    grid-column: 1 / -1;
    justify-self: start;
    cursor: pointer;
}
