.peticiones-town-list {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    left: 0;
    z-index: 20;
    max-height: 14rem;
    overflow-y: auto;
    margin: 0;
    padding: 0.35rem;
    border: 1px solid rgba(214, 212, 216, 0.92);
    border-radius: 0.95rem;
    background: #fff;
    box-shadow: 0 18px 40px rgba(23, 19, 28, 0.08);
    list-style: none;
}

.peticiones-town-option {
    display: block;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    color: #17131c;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: left;
}

.peticiones-town-option:hover,
.peticiones-town-option:focus-visible {
    background: #fff5f8;
    color: var(--ecs-color-primary);
    outline: none;
}

.peticiones-town-option.is-empty {
    color: #77717f;
    cursor: default;
}

.peticiones-town-option.is-empty:hover,
.peticiones-town-option.is-empty:focus-visible {
    background: transparent;
    color: #77717f;
}

.peticiones-toggle {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 4.4rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(214, 212, 216, 0.95);
    border-radius: 0.95rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.peticiones-toggle:hover,
.peticiones-toggle:focus-within {
    border-color: #f3c4d4;
    background: #fffdfd;
}

.peticiones-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.peticiones-toggle-control {
    position: relative;
    flex: 0 0 auto;
    width: 3.1rem;
    height: 1.65rem;
    border: 1px solid #d8d5dc;
    border-radius: 999px;
    background: var(--ecs-color-secondary);
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.peticiones-toggle-control::before {
    content: "";
    position: absolute;
    top: 0.18rem;
    left: 0.2rem;
    width: 1.18rem;
    height: 1.18rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(23, 19, 28, 0.12);
    transition: transform 0.18s ease;
}

.peticiones-toggle input[type="checkbox"]:checked ~ .peticiones-toggle-control {
    border-color: var(--ecs-color-primary);
    background: var(--ecs-color-primary);
}

.peticiones-toggle input[type="checkbox"]:checked ~ .peticiones-toggle-control::before {
    transform: translateX(1.42rem);
}

.peticiones-toggle input[type="checkbox"]:disabled ~ .peticiones-toggle-control,
.peticiones-toggle:has(input[type="checkbox"]:disabled) {
    cursor: default;
    opacity: 0.82;
}

.peticiones-toggle strong,
.peticiones-toggle em {
    display: block;
}

.peticiones-toggle strong {
    color: #17131c;
    font-size: 0.92rem;
    font-weight: 800;
}

.peticiones-toggle em {
    margin-top: 0.15rem;
    color: #77717f;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 600;
    line-height: 1.35;
}

.peticiones-edit-page .ecs-select-button:disabled {
    color: #77717f;
    cursor: default;
    opacity: 0.72;
}

/* Participant peticiones index: mobile card list only */
@media (max-width: 767.98px) {
    body.peticiones-participant-list .ecs-list-page {
        padding-top: 0.85rem;
        padding-bottom: 1.75rem;
    }

    body.peticiones-participant-list .ecs-list-hero h1 {
        font-size: 1.7rem;
        line-height: 1.08;
    }

    body.peticiones-participant-list .ecs-list-filter-panel {
        gap: 0.75rem;
        padding: 0.85rem;
        border-radius: 1.1rem;
    }

    body.peticiones-participant-list .ecs-list-filter-grid,
    body.peticiones-participant-list .ecs-list-field {
        width: 100%;
        min-width: 0;
    }

    body.peticiones-participant-list .ecs-list-primary-action {
        width: 100%;
        justify-content: center;
        min-height: 2.85rem;
    }

    body.peticiones-participant-list .ecs-list-table thead {
        display: none;
    }

    body.peticiones-participant-list .ecs-list-table,
    body.peticiones-participant-list .ecs-list-table tbody,
    body.peticiones-participant-list .ecs-list-table tr,
    body.peticiones-participant-list .ecs-list-table td {
        display: block;
        width: 100%;
    }

    body.peticiones-participant-list .ecs-list-table-card {
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    body.peticiones-participant-list .peticiones-row-participant {
        display: grid;
        gap: 0.6rem;
        margin-bottom: 0.75rem;
        padding: 0.9rem;
        border: 1px solid rgba(214, 212, 216, 0.92);
        border-radius: 1.1rem;
        background: #fff;
    }

    body.peticiones-participant-list .peticiones-row-participant:hover {
        background: #fff;
    }

    body.peticiones-participant-list .peticiones-row-participant td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0;
        border: 0;
        font-size: 0.92rem;
        font-weight: 650;
    }

    body.peticiones-participant-list .peticiones-row-participant td::before {
        content: attr(data-label);
        color: #7a7580;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        flex: 0 0 auto;
    }

    body.peticiones-participant-list .peticiones-row-participant td[data-label="Solicitante"] {
        display: block;
        padding-bottom: 0.35rem;
        border-bottom: 1px solid #f0eef2;
        font-size: 1rem;
        font-weight: 800;
        color: #17131c;
    }

    body.peticiones-participant-list .peticiones-row-participant td[data-label="Solicitante"]::before {
        display: block;
        margin-bottom: 0.2rem;
    }

    body.peticiones-participant-list .peticiones-row-participant td[data-label="No."] {
        order: -1;
    }

    body.peticiones-participant-list .peticiones-row-participant td[data-label="Acciones"] {
        justify-content: flex-end;
        padding-top: 0.4rem;
        border-top: 1px solid #f0eef2;
    }

    body.peticiones-participant-list .peticiones-row-participant td[data-label="Acciones"]::before {
        margin-right: auto;
    }

    body.peticiones-participant-list .ecs-list-row-action {
        width: 2.55rem;
        height: 2.55rem;
    }

    body.peticiones-participant-list .ecs-soft-badge {
        font-size: 0.78rem;
    }
}

/* Chat & Bitácora en Peticiones Especiales */
.peticion-chat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    margin-left: 0.4rem;
    border-radius: 999px;
    background: var(--ecs-color-primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.peticion-chat-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 32rem;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid rgba(214, 212, 216, 0.85);
    border-radius: 1.15rem;
    background: #faf9fb;
}

.peticion-chat-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 82%;
    padding: 0.95rem 1.15rem;
    border-radius: 1.15rem;
    box-shadow: 0 2px 8px rgba(23, 19, 28, 0.04);
}

.peticion-chat-card.is-participant {
    align-self: flex-start;
    border: 1px solid rgba(214, 212, 216, 0.95);
    background: #fff;
}

.peticion-chat-card.is-admin {
    align-self: flex-end;
    border: 1px solid rgba(206, 50, 105, 0.25);
    background: #fff9fb;
}

.peticion-chat-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.peticion-chat-author {
    color: #17131c;
    font-size: 0.88rem;
    font-weight: 800;
}

.peticion-chat-role {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.peticion-chat-card.is-participant .peticion-chat-role {
    background: #edeaf0;
    color: #554f5c;
}

.peticion-chat-card.is-admin .peticion-chat-role {
    background: #fde8ef;
    color: var(--ecs-color-primary);
}

.peticion-chat-time {
    margin-left: auto;
    color: #8c8694;
    font-size: 0.75rem;
    font-weight: 600;
}

.peticion-chat-text {
    color: #2b2733;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.peticion-chat-composer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding: 1.15rem;
    border: 1px solid rgba(214, 212, 216, 0.85);
    border-radius: 1.15rem;
    background: #fff;
}

.peticion-chat-textarea {
    width: 100%;
    min-height: 5.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(214, 212, 216, 0.95);
    border-radius: 0.85rem;
    background: #faf9fb;
    color: #17131c;
    font: inherit;
    font-size: 0.92rem;
    resize: vertical;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.peticion-chat-textarea:focus {
    border-color: var(--ecs-color-primary);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(206, 50, 105, 0.12);
}

.peticiones-help-text {
    display: block;
    margin-top: 0.35rem;
    color: #77717f;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
}

#requestDateField:has(.ecs-validation-message.field-validation-error:not(:empty)) {
    margin-bottom: 1.85rem;
}

#requestDateField .ecs-validation-message.field-validation-error {
    display: block !important;
    color: var(--ecs-color-primary) !important;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.25;
}

