/* =====================================================
   Property Booking — Calendar & Form Styles
   ===================================================== */

/* Maintenance notice */
.pb-maintenance-notice {
    background: #fff8e1;
    border-left: 4px solid #f0a500;
    border-radius: 4px;
    padding: 20px 24px;
    font-size: 15px;
    color: #555;
}

/* ---- Stepper ---- */
.pb-stepper {
    display: flex;
    align-items: flex-start;
    margin-bottom: 28px;
    gap: 0;
}

.pb-stepper-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
    opacity: 0.38;
    transition: opacity 0.3s;
}

.pb-stepper-step.pb-stepper-active {
    opacity: 1;
}

.pb-stepper-step.pb-stepper-done {
    opacity: 0.7;
}

.pb-stepper-circle {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ccc;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.pb-stepper-step.pb-stepper-active .pb-stepper-circle {
    background: #2196a8;
}

/* Trin 3: når booking er gennemført vises grøn cirkel med flueben */
.pb-stepper-complete #pb-stepper-3 .pb-stepper-circle {
    background: #4caf7d;
    font-size: 0;
}

.pb-stepper-complete #pb-stepper-3 .pb-stepper-circle::before {
    content: '✓';
    font-size: 18px;
}

.pb-stepper-complete #pb-stepper-3 {
    opacity: 1;
}

.pb-stepper-step.pb-stepper-done .pb-stepper-circle {
    background: #4caf7d;
}

.pb-stepper-step.pb-stepper-done .pb-stepper-circle::before {
    content: '✓';
    font-size: 18px;
}

.pb-stepper-step.pb-stepper-done .pb-stepper-circle {
    font-size: 0; /* hide number when showing checkmark */
}

.pb-stepper-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 4px;
    min-width: 0;
}

.pb-stepper-label {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

.pb-stepper-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.pb-stepper-line {
    flex: 0 0 24px;
    height: 2px;
    background: #ddd;
    margin-top: 18px;
    margin-left: 4px;
    margin-right: 4px;
    border-radius: 1px;
    transition: background 0.3s;
}

.pb-stepper-line.pb-stepper-line-done {
    background: #4caf7d;
}

@media (max-width: 600px) {
    .pb-stepper-desc { display: none; }
    .pb-stepper-label { font-size: 12px; }
    .pb-stepper-line { flex: 0 0 10px; }
}


/* Wrap */
.pb-wrap {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #333;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Override Nicepage/theme interference on calendar cells */
.pb-cal-table td::before,
.pb-cal-table td::after,
.pb-cal-table th::before,
.pb-cal-table th::after {
    display: none !important;
    content: none !important;
}

.pb-period-notice {
    background: #f0f7ff;
    border-left: 4px solid #2196a8;
    padding: 10px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #555;
}

/* ---- Layout ---- */
.pb-calendar-layout {
    display: flex;
    gap: 24px;
    flex-wrap: nowrap;
    align-items: flex-start;
}

.pb-calendar-col {
    flex: 1 1 auto;
    min-width: 0;
}

.pb-summary-col {
    flex: 0 0 280px;
    min-width: 280px;
}

/* ---- Nav ---- */
.pb-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pb-nav-btn {
    background: #2196a8;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.pb-nav-btn:hover { background: #187a85; }

.pb-nav-selects {
    display: flex;
    gap: 6px;
    align-items: center;
}

.pb-nav-select {
    border: 1px solid #2196a8;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 14px;
    font-weight: bold;
    color: #2196a8;
    background: #fff;
    cursor: pointer;
    appearance: auto;
}

.pb-nav-select:focus { outline: 2px solid #2196a8; }

.pb-month-label {
    font-weight: bold;
    font-size: 16px;
}

/* ---- Calendar table ---- */
.pb-cal-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.pb-wk-th,
.pb-wk-num {
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    text-align: center;
    font-size: 11px;
    color: #aaa;
    padding: 0 2px;
    vertical-align: middle;
    font-weight: normal;
    border-right: 1px solid #eee;
}

.pb-wk-num {
    height: 44px;
    line-height: 44px;
    background: #fafafa;
}

.pb-cal-table th {
    text-align: center;
    padding: 6px 0;
    font-size: 12px;
    color: #888;
    font-weight: normal;
}

.pb-cal-table td {
    text-align: center;
    padding: 0;
    height: 44px;
    width: 14.28%;
    border-radius: 4px;
    position: relative;
    cursor: default;
    box-sizing: border-box;
}

.pb-cal-table tr {
    border-bottom: 3px solid transparent;
}

.pb-cal-table tbody tr {
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.10));
}

.pb-cal-day { border-radius: 4px; }

.pb-day-num {
    display: block;
    line-height: 44px;
    font-size: 13px;
    position: relative;
    z-index: 2;
}

/* ---- Cell states ---- */
.pb-avail {
    background: #4caf50;
    color: #fff;
    cursor: pointer;
}
.pb-avail:hover { background: #388e3c; }

.pb-avail-no {
    background: #a5d6a7;
    color: #333;
}

.pb-unavail {
    background: #ef5350;
    color: #fff;
}

.pb-past {
    background: #f5f5f5;
    color: #bbb;
}

/* Split cell (check-in/check-out same day) */
.pb-split {
    background: transparent !important;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.pb-split-top,
.pb-split-bot {
    position: absolute;
    left: 0;
    right: 0;
    height: 50%;
    z-index: 1;
}

.pb-split-top { top: 0; }
.pb-split-bot { bottom: 0; }

.pb-unavail-half  { background: #ef5350; }
.pb-avail-half    { background: #4caf50; }
.pb-avail-no-half { background: #a5d6a7; }
.pb-selected-half { background: #2196a8; }

.pb-split .pb-day-num {
    position: relative;
    z-index: 3;
    line-height: 44px;
    display: block;
    text-align: center;
    color: #fff;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
    font-weight: bold;
}

/* Selected range */
.pb-in-range {
    background: #b2ebf2 !important;
    color: #333;
    border-radius: 0;
}

.pb-range-start {
    background: #2196a8 !important;
    color: #fff !important;
    border-radius: 4px 0 0 4px;
}

.pb-range-end {
    background: #2196a8 !important;
    color: #fff !important;
    border-radius: 0 4px 4px 0;
}

/* Split skal altid vinde over range-farver — kommer efter i CSS */
.pb-split {
    background: transparent !important;
}

/* ---- Legend ---- */
.pb-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    font-size: 12px;
}

.pb-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pb-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.pb-dot.pb-avail    { background: #4caf50; }
.pb-dot.pb-avail-no { background: #a5d6a7; }
.pb-dot.pb-unavail  { background: #ef5350; }
.pb-dot.pb-selected { background: #2196a8; }

/* ---- Summary box ---- */
.pb-summary-box {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
}

.pb-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    gap: 8px;
}

.pb-summary-label {
    font-size: 13px;
    color: #666;
    white-space: normal;
    flex: 1 1 auto;
}

.pb-summary-value {
    font-weight: bold;
    font-size: 13px;
    white-space: nowrap;
    flex: 0 0 auto;
    text-align: right;
}

.pb-select {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
    background: #fff;
}

#pb-guests {
    max-width: 200px;
    width: 100%;
}

/* ---- Price display ---- */
.pb-price-display {
    margin-top: 12px;
    border-top: 1px solid #e0e0e0;
    padding-top: 12px;
}

.pb-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    margin-bottom: 6px;
    gap: 8px;
}

.pb-price-row > span:first-child {
    white-space: normal;
    flex: 1 1 auto;
}

.pb-price-row > span:last-child {
    white-space: nowrap;
    flex: 0 0 auto;
    text-align: right;
}

.pb-price-total {
    font-weight: bold;
    font-size: 15px;
    border-top: 1px solid #ccc;
    padding-top: 6px;
    margin-top: 4px;
}

/* ---- Book button ---- */
.pb-btn-book {
    display: block;
    width: 100%;
    margin-top: 14px;
    background: #2196a8;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}

.pb-btn-book:hover { background: #187a85; }

.pb-btn-secondary {
    background: #888;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.pb-btn-secondary:hover { background: #666; }

/* ---- Form ---- */
.pb-form-section {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.pb-form-section h3 {
    margin: 0 0 14px;
    font-size: 15px;
    color: #2196a8;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.pb-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pb-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pb-form-group label {
    font-size: 12px;
    color: #555;
    font-weight: bold;
}

.pb-form-group input,
.pb-form-group select {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 14px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

.pb-form-group input:focus,
.pb-form-group select:focus {
    border-color: #2196a8;
    outline: none;
}

.pb-full-width { grid-column: 1 / -1; }

/* ---- Extras table ---- */
.pb-extras-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.pb-extras-table th,
.pb-extras-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.pb-extras-table th {
    color: #666;
    font-weight: bold;
    background: #f0f0f0;
}

/* ---- Totals ---- */
.pb-total-section {
    background: #2196a8;
    color: #fff;
    border-color: #2196a8;
}

.pb-total-section h3 { color: #fff; border-color: rgba(255,255,255,0.3); }

.pb-total-grid { display: flex; flex-direction: column; gap: 6px; }

.pb-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
    gap: 8px;
}

.pb-total-row > span:first-child {
    white-space: normal;
    flex: 1 1 auto;
}

.pb-total-row > span:last-child {
    white-space: nowrap;
    flex: 0 0 auto;
    text-align: right;
}

.pb-total-grand {
    font-weight: bold;
    font-size: 16px;
    border-top: 1px solid rgba(255,255,255,0.4);
    padding-top: 8px;
    margin-top: 4px;
}

/* ---- Terms ---- */
.pb-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    cursor: pointer;
}

.pb-terms-label input[type=checkbox] {
    margin-top: 2px;
    flex-shrink: 0;
}

.pb-terms-label a { color: #2196a8; }

/* ---- Form actions ---- */
.pb-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

/* ---- Honeypot (anti-spam) ---- */
.pb-hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ---- Error ---- */
.pb-form-error {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    color: #c62828;
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 13px;
}

/* ---- Thank you / Step 3 ---- */
.pb-thanks-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.pb-thanks-header {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #2196a8;
    color: #fff;
    padding: 28px 32px;
}

.pb-thanks-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
}

.pb-thanks-title {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.pb-thanks-reserved {
    margin: 0;
    font-size: 14px;
    opacity: 0.88;
    color: #fff;
}

.pb-thanks-next-title {
    margin: 28px 32px 14px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.pb-thanks-steps {
    margin: 0 32px 24px 52px;
    padding: 0;
    color: #444;
    font-size: 14px;
    line-height: 1.7;
}

.pb-thanks-steps li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.pb-thanks-steps li::marker {
    color: #2196a8;
    font-weight: bold;
}

.pb-thanks-contact {
    margin: 0;
    padding: 18px 32px;
    border-top: 1px solid #f0f0f0;
    background: #f9f9f9;
    font-size: 13px;
    color: #666;
}

.pb-thanks-contact a {
    color: #2196a8;
    text-decoration: none;
    font-weight: bold;
}

/* ---- Responsive ---- */
@media (max-width: 700px) {
    .pb-calendar-layout { flex-wrap: wrap; }
    .pb-summary-col      { flex: 1 1 auto; min-width: 0; }
    .pb-form-grid        { grid-template-columns: 1fr; }
    .pb-full-width       { grid-column: 1; }
}

/* ---- Admin styles ---- */
.pb-admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.pb-admin-table th { background: #f5f5f5; font-weight: bold; }
.pb-admin-table tr:hover td { background: #fafafa; }

.pb-status-pending   { color: #e65100; font-weight: bold; }
.pb-status-confirmed { color: #2e7d32; font-weight: bold; }
.pb-status-cancelled { color: #b71c1c; font-weight: bold; }

.pb-add-row-btn {
    margin-top: 10px;
    background: #4caf50;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.pb-add-row-btn:hover { background: #388e3c; }

.pb-del-btn {
    background: #ef5350;
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.pb-del-btn:hover { background: #c62828; }
