/* ── Portal layout ─────────────────────────────────────────────────────── */
.pp-portal { max-width: 960px; width: 100%; box-sizing: border-box; }

/* Ensure WC My Account content column fills available space */
.woocommerce-MyAccount-content { min-width: 0; overflow: visible; }

.pp-portal__nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 0;
}

.pp-portal__nav-link {
    display: inline-block;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.pp-portal__nav-link:hover { color: #b5451b; }

.pp-portal__nav-link--active {
    color: #b5451b;
    border-bottom-color: #b5451b;
}

/* ── Dashboard CTA ─────────────────────────────────────────────────────── */
.pp-dashboard-cta {
    margin: 0 0 28px;
}

.pp-button--large {
    padding: 16px 36px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
}

.pp-button--cta {
    background: #b5451b !important;
    color: #fff !important;
    border-radius: 6px !important;
    display: inline-block;
    text-decoration: none;
    transition: background 0.15s;
}

.pp-button--cta:hover { background: #8f3614 !important; color: #fff !important; }

/* ── Credit pills ──────────────────────────────────────────────────────── */
.pp-portal__credit-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
    margin-bottom: 24px;
}

.pp-credit-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 100px;
    padding: 6px 16px 6px 10px;
}

.pp-credit-pill__count {
    background: #b5451b;
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.pp-credit-pill--puppy     .pp-credit-pill__count { background: #2271b1; }
.pp-credit-pill--obedience .pp-credit-pill__count { background: #b5451b; }
.pp-credit-pill--behaviour .pp-credit-pill__count { background: #3d8055; }

.pp-credit-pill__type { font-size: 13px; font-weight: 600; color: #333; }

/* ── Empty state ───────────────────────────────────────────────────────── */
.pp-portal__empty {
    color: #666;
    font-style: italic;
    padding: 20px 0;
}

/* ── Credit type picker (book section) ─────────────────────────────────── */
.pp-credit-type-picker {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.pp-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 24px;
    background: #f7f7f7;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    transition: border-color 0.15s, background 0.15s;
}

.pp-type-btn:hover { border-color: #b5451b; background: #fff; }

.pp-type-btn--active {
    border-color: #b5451b;
    background: #fff8f6;
    color: #b5451b;
}

.pp-type-btn__count {
    font-size: 12px;
    font-weight: 400;
    color: #666;
}

.pp-type-btn--active .pp-type-btn__count { color: #b5451b; }

/* ── Calendar slot picker ───────────────────────────────────────────────── */
#pp-slot-section { margin-top: 8px; }

#pp-slot-heading {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Week navigation */
.pp-cal { margin-top: 4px; width: 100%; min-width: 560px; box-sizing: border-box; }
.pp-rscal-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Scroll wrapper — always active so narrow WC content columns don't squash the grid */
#pp-slot-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pp-cal__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.pp-cal__week-label {
    flex: 1;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.pp-cal__nav-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 34px;
    height: 34px;
    padding: 0;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.pp-cal__nav-btn:hover { background: #f5f5f5; border-color: #b5451b; }
.pp-cal__nav-btn--disabled { opacity: 0.25; pointer-events: none; }

/* 7-column grid */
.pp-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.pp-cal__day {
    border-right: 1px solid #e0e0e0;
    background: #fff;
    min-height: 90px;
}

.pp-cal__day:last-child { border-right: none; }

.pp-cal__day--today { background: #fffaf8; }

.pp-cal__day--past { opacity: 0.45; pointer-events: none; }

/* Day column header */
.pp-cal__day-header {
    padding: 8px 4px 6px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    background: #f9f9f9;
}

.pp-cal__day--today .pp-cal__day-header { background: #fff3ef; }

.pp-cal__day-name {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
}

.pp-cal__day-num {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-top: 4px;
    line-height: 1.2;
}

.pp-cal__day-num small {
    font-size: 10px;
    font-weight: 400;
    color: #999;
    display: block;
}

.pp-cal__day-num--today {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #b5451b;
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    margin: 4px auto 0;
    font-size: 13px;
}

.pp-cal__day-num--today small { color: rgba(255,255,255,0.75); }

/* Slot events within each day */
.pp-cal__day-slots { padding: 5px 4px; }

.pp-cal__no-slots {
    text-align: center;
    color: #ccc;
    font-size: 18px;
    padding: 14px 0;
    line-height: 1;
}

/* Slot event blocks */
.pp-slot-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 5px 3px;
    margin-bottom: 4px;
    background: #fff3ef;
    border: 1px solid #e8b09a;
    border-left: 3px solid #b5451b;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    font-family: inherit;
    text-align: center;
}

.pp-slot-btn:hover {
    background: #b5451b;
    border-color: #b5451b;
    color: #fff;
}

.pp-slot-btn--selected {
    background: #b5451b;
    border-color: #8f3614;
    color: #fff;
}

.pp-slot-btn__time {
    font-size: 12px;
    font-weight: 700;
    color: inherit;
    line-height: 1.2;
}

.pp-slot-btn__dur {
    font-size: 10px;
    color: #888;
    line-height: 1.2;
}

.pp-slot-btn:hover .pp-slot-btn__dur,
.pp-slot-btn--selected .pp-slot-btn__dur { color: rgba(255,255,255,0.8); }

/* ── Booking confirm panel ─────────────────────────────────────────────── */
.pp-booking-panel,
.pp-booking-confirm {
    margin-top: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px 24px;
}

.pp-booking-confirm h3 { margin-top: 0; }

.pp-booking-confirm select {
    margin-top: 4px;
    min-width: 260px;
}

.pp-booking-note {
    font-size: 13px;
    color: #666;
    margin-top: 12px;
}

/* ── Success / error states ────────────────────────────────────────────── */
.pp-success {
    background: #edfaef;
    border: 1px solid #5cb85c;
    border-radius: 6px;
    padding: 16px 20px;
    margin-top: 16px;
}

.pp-success p { margin: 0 0 10px; font-weight: 600; color: #1a5c1a; }
.pp-success p:last-child { margin-bottom: 0; }

.pp-success-partial {
    background: #fffbe6;
    border: 1px solid #f0c040;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 8px;
    font-weight: 600;
    color: #5a4000;
}

.pp-error {
    background: #fdf2f2;
    border: 1px solid #e57373;
    border-radius: 4px;
    padding: 10px 14px;
    color: #b71c1c;
    margin-bottom: 12px;
}

/* ── Questionnaire ─────────────────────────────────────────────────────── */
.pp-questionnaire-panel,
.pp-questionnaire {
    margin-top: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px 24px;
}

.pp-questionnaire h3 { margin-top: 0; }

.pp-q-field {
    margin-bottom: 16px;
}

.pp-q-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.pp-q-field input[type="text"],
.pp-q-field textarea,
.pp-q-field select {
    width: 100%;
    max-width: 500px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.pp-q-field textarea { resize: vertical; }

.pp-required { color: #b5451b; margin-left: 2px; }

/* ── Bookings table ────────────────────────────────────────────────────── */
.pp-bookings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.pp-bookings-table th,
.pp-bookings-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.pp-bookings-table th {
    font-weight: 700;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.pp-bookings-table tr:last-child td { border-bottom: none; }

/* ── Credits table ─────────────────────────────────────────────────────── */
.pp-credits-table {
    width: 100%;
    border-collapse: collapse;
}

.pp-credits-table th,
.pp-credits-table td {
    text-align: left;
    padding: 9px 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.pp-credits-table th { font-weight: 700; background: #f9f9f9; }

.pp-credit-row--consumed td,
.pp-credit-row--expired td { color: #999; }

.pp-credits-table code {
    font-size: 12px;
    background: #f0f0f0;
    padding: 2px 5px;
    border-radius: 3px;
}

/* ── Status badges ─────────────────────────────────────────────────────── */
.pp-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.pp-status--pending   { background: #fff8e1; color: #996800; }
.pp-status--confirmed { background: #edfaef; color: #1a5c1a; }
.pp-status--cancelled { background: #fdf2f2; color: #b71c1c; }

/* ── Booking action buttons ────────────────────────────────────────────── */
.pp-booking-actions { white-space: nowrap; }
.pp-booking-actions .button,
.pp-booking-actions button { margin-right: 6px; }

.pp-status-action {
    font-size: 13px;
    color: #b5451b;
    text-decoration: none;
}

.pp-status-action:hover { text-decoration: underline; }

/* ── Reschedule inline row ─────────────────────────────────────────────── */
.pp-reschedule-inline td,
.pp-questionnaire-inline td {
    padding: 12px;
    background: #f9f9f9;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.pp-button--primary {
    margin-top: 16px;
    background: #b5451b !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 28px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 5px !important;
    cursor: pointer;
    transition: background 0.15s;
}

.pp-button--primary:hover { background: #8f3614 !important; }
.pp-button--primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Favourite locations (My Account section) ──────────────────────────── */
.pp-fav-add-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 28px;
}

.pp-fav-add-section h3 { margin-top: 0; }

.pp-fav-name-row {
    margin-bottom: 12px;
}

.pp-fav-name-row label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.pp-fav-name-row input {
    width: 100%;
    max-width: 380px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.pp-fav-map {
    height: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
}

.pp-fav-coords-note {
    font-size: 12px;
    color: #888;
    margin-bottom: 14px;
}

.pp-fav-saved-section h3 { margin-top: 0; }

.pp-fav-saved-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pp-fav-saved-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.pp-fav-saved-item:last-child { border-bottom: none; }

.pp-fav-saved-name {
    font-weight: 600;
    flex-shrink: 0;
}

.pp-fav-saved-addr {
    color: #666;
    font-size: 13px;
    flex: 1;
}

.pp-fav-map-link {
    font-size: 12px;
    color: #888;
    flex-shrink: 0;
}

.pp-fav-remove-btn {
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Session location question ─────────────────────────────────────────── */
.pp-loc-step1 {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}

.pp-loc-field select {
    width: 100%;
    max-width: 400px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.pp-loc-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 6px 0;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}

.pp-loc-radio-label input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #b5451b;
}

.pp-loc-map {
    min-height: 260px;
}

.pp-loc-map-search {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}

.pp-loc-map-search input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.pp-loc-addr-display {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    background: #f9f9f9;
    font-family: inherit;
}

/* ── Dashboard CTA ─────────────────────────────────────────────────────── */
.pp-dashboard-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

/* ── Content gate ──────────────────────────────────────────────────────── */
.pp-content-gate {
    background: #f9f0f2;
    border: 2px solid #811330;
    border-radius: 8px;
    padding: 28px 32px;
    margin-top: 32px;
    text-align: center;
}

.pp-content-gate__heading {
    font-size: 17px;
    font-weight: 600;
    color: #811330;
    margin: 0 0 8px;
}

.pp-content-gate__sub {
    color: #555;
    margin: 0 0 20px;
}

.pp-content-gate__login {
    margin: 14px 0 0;
    font-size: 13px;
    color: #888;
}

.pp-content-gate__login a { color: #811330; }

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .pp-portal__nav-link { padding: 8px 12px; font-size: 13px; }
    .pp-type-btn { min-width: 100px; padding: 12px 16px; }
    .pp-booking-confirm, .pp-questionnaire { padding: 16px; }
    .pp-bookings-table th, .pp-bookings-table td { padding: 8px; font-size: 13px; }
    .pp-cal__day-name { font-size: 9px; }
    .pp-cal__day-num { font-size: 11px; }
    .pp-slot-btn__time { font-size: 11px; }
    .pp-slot-btn__dur { display: none; }
}
