/* Farmacias de turno — página pública */

.farm-page {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
}

.farm-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
}

.farm-breadcrumb a {
    color: #64748b;
    text-decoration: none;
}

.farm-breadcrumb a:hover,
.farm-breadcrumb a:focus-visible {
    color: #0f172a;
    text-decoration: underline;
}

.farm-breadcrumb__sep {
    opacity: 0.5;
}

.farm-breadcrumb__here {
    color: #475569;
}

.farm-section {
    margin-top: 18px;
}

.farm-section__head {
    margin-bottom: 12px;
}

.farm-section__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: clamp(16px, 4.2vw, 18px);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.farm-section__title i {
    font-size: 1.1em;
    color: #e11d48;
}

.farm-section--schedule .farm-section__title i {
    color: #64748b;
}

.farm-section__meta {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}

.farm-section__lead {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}

/* Tarjeta de turno */
.farm-turno {
    position: relative;
    padding: 18px 16px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.farm-turno--hoy {
    border-color: rgba(16, 185, 129, 0.35);
    background: linear-gradient(165deg, #ecfdf5 0%, #fff 42%, #fff 100%);
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.12);
}

.farm-turno--hoy::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 4px;
    height: 100%;
    border-radius: 20px 0 0 20px;
    background: linear-gradient(180deg, #34d399, #059669);
}

.farm-turno__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.farm-turno__chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #047857;
    background: rgba(16, 185, 129, 0.15);
}

.farm-turno--hoy .farm-turno__chip {
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
}

.farm-turno__date {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.farm-turno__name {
    margin: 0 0 10px;
    font-size: clamp(18px, 5vw, 22px);
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.farm-turno__maps {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    color: #0369a1;
    text-decoration: none;
}

.farm-turno__maps i {
    margin-top: 2px;
    flex-shrink: 0;
    font-size: 15px;
}

.farm-turno__maps:hover,
.farm-turno__maps:focus-visible {
    text-decoration: underline;
}

.farm-turno__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.farm-turno__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 8rem;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, opacity 0.15s ease;
}

.farm-turno__btn--tel {
    color: #fff;
    background: linear-gradient(145deg, #0ea5e9, #0284c7);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.farm-turno__btn--maps {
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.farm-turno__btn:active {
    transform: scale(0.98);
    opacity: 0.95;
}

/* Timeline próximos */
.farm-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 12px;
    border-left: 2px solid #e2e8f0;
}

.farm-timeline__item {
    position: relative;
    margin: 0 0 14px;
    padding-left: 16px;
}

.farm-timeline__item::before {
    content: '';
    position: absolute;
    left: -17px;
    top: 22px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #cbd5e1;
    box-shadow: 0 0 0 3px #f8fafc;
}

.farm-timeline__item:last-child {
    margin-bottom: 0;
}

.farm-timeline .farm-turno {
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

/* Vacíos */
.farm-empty-today {
    padding: 24px 18px;
    text-align: center;
    border-radius: 20px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
}

.farm-empty-today__icon {
    font-size: 28px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.farm-empty-today__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 800;
    color: #475569;
}

.farm-empty-today__text {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.45;
}

.farm-empty-list {
    margin: 0;
    padding: 20px 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
}

.farm-disclaimer {
    margin: 20px 0 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
    color: #94a3b8;
    text-align: center;
}

/* WhatsApp */
.farm-share {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.farm-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 0;
    min-width: 8rem;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease;
}

.farm-share__btn i {
    font-size: 14px;
}

.farm-share__btn--turno {
    color: #fff;
    background: linear-gradient(145deg, #22c55e, #15803d);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28);
}

.farm-share__btn--page {
    color: #0f172a;
    background: linear-gradient(180deg, #fffbeb, #fff7ed);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.farm-share__btn--solo {
    margin-top: 4px;
    flex: 1 1 100%;
}

.farm-share__btn:active {
    transform: scale(0.98);
}

.farm-back.td-page-back {
    display: flex;
    width: 100%;
    max-width: 280px;
    margin: 20px auto 0;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
}

.farm-back i {
    font-size: 20px;
    margin-left: -4px;
}

@media (min-width: 640px) {
    .farm-timeline {
        padding-left: 16px;
    }

    .farm-turno__actions {
        max-width: 360px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .farm-turno__btn:active,
    .farm-share__btn:active {
        transform: none;
    }
}
