/* ─── Psí škola Lucky — Frontend CSS ─────────────────────────────────────── */

/* ── Sdílené ──────────────────────────────────────────────────────────────── */
.psr-cal-wrap { font-family: inherit; max-width: 900px; margin: 0 auto; }

.psr-loading  { text-align: center; color: #888; padding: 2rem; }
.psr-empty    { text-align: center; color: #888; padding: 2rem; }

.psr-cal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.psr-cal-title { flex: 1; text-align: center; }
.psr-cal-title h2 { margin: 0 0 6px; font-size: 1.2rem; }

.psr-nav-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 14px;
    cursor: pointer;
    font-size: 18px;
    transition: background .15s;
}
.psr-nav-btn:hover { background: #f0f0f0; }

.psr-view-tabs { display: flex; gap: 4px; justify-content: center; }
.psr-view-tabs button {
    border: 1px solid #ccc;
    background: #fff;
    padding: 4px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background .15s;
}
.psr-view-tabs button.active { background: #2b7a2b; color: #fff; border-color: #2b7a2b; }

/* ── Měsíční grid ─────────────────────────────────────────────────────────── */
.psr-month-head {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    color: #888;
    padding: 4px 0;
}
.psr-month-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.psr-cell {
    min-height: 80px;
    padding: 4px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
}
.psr-cell.other   { background: #f9f9f9; }
.psr-cell.today   { border-color: #2b7a2b; background: #f0fff0; }
.psr-cell-day     { display: block; font-size: 11px; color: #aaa; margin-bottom: 2px; }
.psr-cell.today .psr-cell-day { color: #2b7a2b; font-weight: bold; }

/* ── Pills ────────────────────────────────────────────────────────────────── */
.psr-pill {
    display: block;
    width: 100%;
    text-align: left;
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 3px;
    margin-bottom: 2px;
    cursor: pointer;
    border: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: opacity .15s;
}
.psr-pill:hover { opacity: .8; }
.psr-pill-time  { margin-right: 3px; }
.psr-pill-label { font-size: 10px; opacity: 0.85; margin-left: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60px; }

.psr-pill--open      { background: #d4edda; color: #155724; }
.psr-pill--booked    { background: #cce5ff; color: #004085; }
.psr-pill--full      { background: #ffe5b4; color: #7d4200; }
.psr-pill--almost    { background: #fff3cd; color: #856404; }
.psr-pill--closed    { background: #e8e8e8; color: #555; }
.psr-pill--cancelled { background: #f8d7da; color: #721c24; text-decoration: line-through; }
.psr-pill--walk      { background: #d1ecf1; color: #0c5460; }
.psr-pill--tip       { background: #fff; color: #555; border: 1px dashed #bbb; }

/* ── Týdenní pohled ───────────────────────────────────────────────────────── */
.psr-week-day-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.psr-week-day-tabs button {
    flex: 1;
    padding: 5px 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    min-width: 36px;
}
.psr-week-day-tabs button.active { background: #2b7a2b; color: #fff; border-color: #2b7a2b; }
.psr-week-day-tabs button.today  { border-color: #2b7a2b; }

.psr-week-cols {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.psr-week-col {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 8px;
    min-height: 80px;
}
.psr-week-col.today { border-color: #2b7a2b; }
.psr-week-col-head  { font-size: 11px; font-weight: bold; color: #888; margin-bottom: 6px; }
.psr-week-date      { display: block; font-size: 10px; color: #aaa; }
.psr-week-empty     { color: #ccc; font-size: 12px; }

.psr-week-card {
    padding: 6px 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: opacity .15s;
}
.psr-week-card:hover { opacity: .85; }
.psr-wc-time { font-weight: bold; font-size: 13px; }
.psr-wc-type { margin-top: 2px; }
.psr-wc-loc  { color: inherit; opacity: .75; font-size: 11px; }
.psr-wc-spots, .psr-wc-res { font-size: 11px; margin-top: 2px; }

/* ── Agenda ───────────────────────────────────────────────────────────────── */
.psr-agenda { display: flex; flex-direction: column; gap: 8px; }
.psr-agenda-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    background: #fff;
    cursor: pointer;
    transition: box-shadow .15s;
}
.psr-agenda-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.psr-agenda-date { min-width: 90px; flex-shrink: 0; }
.psr-agenda-time { font-size: 13px; color: #888; }
.psr-agenda-title { font-weight: bold; margin-bottom: 4px; }
.psr-agenda-dogs  { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.psr-agenda-dog-status { display: flex; align-items: center; gap: 5px; }

/* ── Kreditní widget ──────────────────────────────────────────────────────── */
.psr-credit-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.psr-credit-card {
    padding: 0;
    min-width: 200px;
    flex: 1;
}
.psr-credit-name    { font-weight: bold; font-size: 15px; margin-bottom: 2px; }
.psr-credit-amount  { font-size: 20px; font-weight: 700; color: #1a5e1a; }
.psr-credit-lessons { font-size: 13px; font-weight: normal; color: #555; }
.psr-credit-expiry  { font-size: 12px; color: #888; margin-top: 2px; }
.psr-pkg-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 12px;
    background: #f0a500;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}
.psr-pkg-btn:hover { background: #c88000; color: #fff; }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.psr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
}
.psr-modal {
    background: #fff;
    border-radius: 10px;
    padding: 28px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.psr-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    line-height: 1;
}
.psr-modal-close:hover { color: #333; }

.psr-modal-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
}
.psr-badge-group_lesson { background: #d4edda; color: #155724; }
.psr-badge-walk         { background: #d1ecf1; color: #0c5460; }
.psr-badge-tip          { background: #f8f9fa; color: #555; border: 1px dashed #bbb; }

.psr-modal-meta { color: #555; font-size: 14px; margin: 4px 0 12px; }

.psr-occupancy {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    font-size: 14px;
}
.psr-occ-bar {
    flex: 1;
    background: #e2e2e2;
    border-radius: 4px;
    height: 10px;
    overflow: hidden;
    max-width: 160px;
}
.psr-occ-fill { height: 10px; border-radius: 4px; transition: width .3s; }
.psr-full-badge {
    background: #c00;
    color: #fff;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.psr-modal-dogs { margin: 12px 0; }
.psr-dog-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.psr-dog-row:last-child { border-bottom: none; }
.psr-dog-name { font-weight: bold; min-width: 80px; }

.psr-booking-window { font-size: 13px; color: #888; margin-top: 8px; }
.psr-alert-cancelled {
    background: #f8d7da;
    color: #721c24;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin: 8px 0;
}

/* ── Tlačítka ─────────────────────────────────────────────────────────────── */
.psr-btn {
    padding: 7px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: opacity .15s;
}
.psr-btn:disabled { opacity: .5; cursor: not-allowed; }
.psr-btn--green { background: #2b7a2b; color: #fff; }
.psr-btn--green:hover:not(:disabled) { background: #1a5e1a; }
.psr-btn--red   { background: #c00; color: #fff; }
.psr-btn--red:hover:not(:disabled) { background: #900; }

.psr-sm-btn {
    padding: 3px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}
.psr-sm-btn--green { background: #2b7a2b; color: #fff; }
.psr-sm-btn--red   { background: #c00; color: #fff; }

.psr-booked-tag {
    display: inline-block;
    background: #cce5ff;
    color: #004085;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}
.psr-reason { font-size: 12px; color: #888; font-style: italic; }

.psr-link-btn {
    display: inline-block;
    padding: 8px 18px;
    background: #2b7a2b;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}
.psr-link-btn:hover { background: #1a5e1a; color: #fff; }
.psr-link-btn--outline {
    background: transparent;
    border: 2px solid #2b7a2b;
    color: #2b7a2b;
}
.psr-link-btn--outline:hover { background: #2b7a2b; color: #fff; }

/* ── Zprávy ───────────────────────────────────────────────────────────────── */
.psr-msg { padding: 10px 14px; border-radius: 5px; margin-top: 10px; font-size: 14px; }
.psr-msg--success { background: #d4edda; color: #155724; }
.psr-msg--error   { background: #f8d7da; color: #721c24; }

/* ── Auth wall ────────────────────────────────────────────────────────────── */
.psr-auth-wall {
    text-align: center;
    padding: 2rem;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    max-width: 480px;
    margin: 1rem auto;
}

/* ── Formulář přihlášky ───────────────────────────────────────────────────── */
.psr-form-wrap { max-width: 600px; margin: 0 auto; }
.psr-form      { display: flex; flex-direction: column; gap: 0; }
.psr-form-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.psr-form-grid--2 { grid-template-columns: 1fr 1fr; }

.psr-field label:not(.psr-radio-opt) {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}
.psr-field input,
.psr-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color .15s;
}
.psr-field input:focus,
.psr-field textarea:focus {
    border-color: #2b7a2b;
    outline: none;
    box-shadow: 0 0 0 2px rgba(43,122,43,.15);
}
.psr-req { color: #c00; }

.psr-radio-row { display: flex; gap: 8px; margin-top: 4px; min-height: unset; line-height: 1.5; }
.psr-radio-opt {
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
    font-weight: normal;
    font-family: inherit;
    box-sizing: border-box;
    min-height: unset;
    line-height: 1.5;
    transition: border-color .15s, background .15s;
}
.psr-radio-opt.selected { border-color: #2b7a2b; background: #f0fff0; }

.psr-divider { border: none; border-top: 1px solid #e8e8e8; margin: 14px 0; }
.psr-gdpr    { font-size: 12px; color: #888; margin: 10px 0; }

.psr-submit-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #2b7a2b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
    margin-top: 6px;
}
.psr-submit-btn:hover:not(:disabled) { background: #1a5e1a; color: #fff; }
.psr-submit-btn:disabled { opacity: .5; cursor: not-allowed; }

.psr-success-box {
    text-align: center;
    padding: 2rem;
    background: #d4edda;
    border-radius: 8px;
    color: #155724;
    border: 1px solid #a8d8a8;
}

/* ── iCal export ──────────────────────────────────────────────────────────── */
.psr-btn-ical {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 16px;
    background: #2c6e49;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.psr-btn-ical:hover { background: #1e4d33; }

.psr-ical-panel {
    margin-top: 12px;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    max-width: 480px;
}
.psr-ical-panel input[type="text"] {
    width: 100%;
    padding: 6px 10px;
    font-size: 12px;
    font-family: monospace;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin: 8px 0;
    background: #fff;
    box-sizing: border-box;
}
.psr-ical-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}
.psr-btn-secondary {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #2c6e49;
    color: #2c6e49;
    background: #fff;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
}
.psr-btn-secondary:hover { background: #f0f7f4; }
.psr-ical-note {
    font-size: 12px;
    color: #6c757d;
    margin: 8px 0 0;
}
[x-cloak] { display: none !important; }

/* ── iCal tlačítko ────────────────────────────────────────────────────────── */
.psr-ical-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 13px;
}
.psr-ical-btn {
    background: none;
    border: 1px solid #a8d8a8;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 13px;
    color: #1a5e1a;
    cursor: pointer;
    transition: background .15s;
}
.psr-ical-btn:hover { background: #f0fff0; }
.psr-ical-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 14px;
    background: #f9fafb;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
.psr-ical-link {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.psr-ical-link--google {
    background: #4285f4;
    color: #fff;
}
.psr-ical-link--google:hover { background: #3367d6; color: #fff; }
.psr-ical-link--apple {
    background: #1c1c1e;
    color: #fff;
}
.psr-ical-link--apple:hover { background: #333; color: #fff; }

/* ── Responsivita ─────────────────────────────────────────────────────────── */
.psr-mobile-only  { display: none; }
.psr-mobile-hidden { /* default: all visible on desktop */ }

@media (max-width: 700px) {
    .psr-mobile-only   { display: flex; }
    .psr-week-cols     { grid-template-columns: 1fr; }
    .psr-week-col      { display: none; }
    .psr-week-col:not(.psr-mobile-hidden) { display: block; }
    .psr-month-body    { gap: 1px; }
    .psr-cell          { min-height: 50px; }
    .psr-form-grid--2  { grid-template-columns: 1fr; }
    .psr-cal-header    { flex-wrap: wrap; }
    .psr-cal-title h2  { font-size: 1rem; }
    .psr-credit-card   { min-width: 100%; }
    .psr-modal         { padding: 20px 16px; }
    .psr-dog-row       { flex-direction: column; align-items: flex-start; }
}

.psr-radio-opt input[type="radio"] {
    width: auto;
    height: auto;
    min-height: unset;
    margin: 0;
    padding: 0;
    position: static;
    appearance: auto;
    -webkit-appearance: auto;
    flex-shrink: 0;
}
