/* =========================================================
   Bootsverleih – Frontend Calendar Styles
   ========================================================= */

/* =========================================================
   3-Month Picker
   ========================================================= */

/* Navigation wrapper */
.bv-nav-container {
    background: #fff;
    padding: .4rem 0 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
    margin-bottom: 1.25rem;
}

/* Calendar icon toggle button */
.bv-picker-icon-btn {
    background: #0060a0;
    border: none;
    border-radius: 4px;
    padding: .25rem .45rem;
    cursor: pointer;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background .15s;
    flex-shrink: 0;
}

.bv-picker-icon-btn:hover,
.bv-picker-icon-btn[aria-expanded="true"] {
    background: #004878;
}

/* Panel */
.bv-picker-panel {
    padding: .75rem;
    background: #f4f6f8;
    border: 2px solid #999;
    border-radius: 6px;
}

/* Panel navigation */
.bv-picker-nav {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}

.bv-picker-nav-btn {
    display: inline-block;
    padding: .3rem .75rem;
    background: #0060a0;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}

.bv-picker-nav-btn:hover {
    background: #004878;
    color: #fff;
}

.bv-picker-nav-today {
    background: #004878;
}

.bv-picker-nav-btn:disabled {
    background: #9cb3c7;
    cursor: default;
}

/* Months grid */
.bv-picker-wrap {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.bv-picker-month {
    flex: 1;
    min-width: 200px;
    max-width: 240px;
}

.bv-picker-title {
    font-weight: 700;
    font-size: .9rem;
    color: #111;
    margin-bottom: .4rem;
    padding: .2rem .3rem;
    background: #e8edf2;
    border-radius: 4px 4px 0 0;
    border: 1px solid #999;
    border-bottom: none;
    text-align: center;
}

.bv-picker-table {
    border-collapse: collapse;
    width: 100%;
    font-size: .75rem;
    border: 1px solid #999;
}

.bv-picker-table th {
    background: #d8dde3;
    color: #333;
    font-weight: 700;
    padding: 3px 2px;
    text-align: center;
    border: 1px solid #999;
}

.bv-picker-week.bv-picker-active td {
    background: #1565c0;
    color: #fff !important;
    font-weight: 700;
}

.bv-picker-day {
    text-align: center;
    padding: 3px 2px;
    border: 1px solid #ccc;
    color: #111;
    background: #fff;
    min-width: 24px;
    cursor: pointer;
}

.bv-picker-day:hover {
    background: #c8dff5;
    color: #111;
}

.bv-picker-week.bv-picker-active .bv-picker-day:hover {
    background: #0d47a1;
    color: #fff;
}

.bv-picker-other {
    color: #999;
    background: #f5f5f5;
}

.bv-picker-today {
    font-weight: 700;
    text-decoration: underline;
}

.bv-picker-booked {
    background: #b71c1c !important;
    color: #fff !important;
}

.bv-picker-other.bv-picker-booked {
    background: #d9534f !important;
    color: #fff !important;
}

/* --- Week navigation --- */
.bv-week-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .3rem .5rem;
}

.bv-nav-btn {
    display: inline-block;
    padding: .25rem .65rem;
    background: #0060a0;
    color: #fff !important;
    border-radius: 4px;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    transition: background .15s;
    white-space: nowrap;
}

.bv-nav-btn:hover {
    background: #004878;
    color: #fff;
}

.bv-nav-today {
    background: #004878;
}

.bv-week-label {
    font-weight: 700;
    font-size: .95rem;
    padding: 0 .5rem;
    color: #757575;
}

/* --- Boat section --- */
.bv-boat-section {
    margin-bottom: 3rem;
    border: 2px solid #bbb !important;
    border-radius: 8px;
    overflow: hidden;
}

.bv-boat-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem;
    background: #e8edf2;
    border-bottom: 2px solid #bbb;
}

.bv-boat-toggle {
    cursor: pointer;
    user-select: none;
}

.bv-boat-toggle:hover {
    background: #d4dde8;
}

.bv-toggle-chevron {
    margin-left: auto;
    flex-shrink: 0;
    color: #555;
    display: flex;
    align-items: center;
    transition: transform .2s ease;
}

.bv-boat-toggle[aria-expanded="true"] .bv-toggle-chevron {
    transform: rotate(180deg);
}

.bv-boat-thumb {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    cursor: zoom-in;
}

#bv-img-preview {
    display: none;
    position: absolute;
    z-index: 9998;
    pointer-events: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,.55);
    border: 2px solid #fff;
}

#bv-img-preview.is-visible {
    display: block;
}

#bv-img-preview img {
    display: block;
    width: 320px;
    height: 240px;
    object-fit: cover;
}

.bv-boat-info h2 {
    margin: 0 0 .3rem;
    font-size: 1.25rem;
    color: #111 !important;
}

.bv-capacity {
    margin: 0 0 .3rem;
    font-size: .85rem;
    color: #333;
    font-weight: 600;
}

.bv-boat-desc {
    font-size: .9rem;
    color: #333;
    margin: 0;
}

.bv-boat-desc p {
    margin: 0;
}

/* --- Calendar wrapper (horizontal scroll on mobile) --- */
.bv-calendar-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: .75rem;
}

/* --- Calendar table --- */
.bv-calendar {
    border-collapse: collapse;
    min-width: 600px;
    width: 100%;
    table-layout: fixed;
}

.bv-calendar td {
    border: 1px solid #999 !important;
    text-align: center;
    vertical-align: top;
    white-space: nowrap;
}

.bv-day-label {
    text-align: left !important;
    padding: 4px 8px !important;
    font-weight: 700;
    color: #111;
    background: #e8edf2 !important;
    min-width: 72px;
    width: 72px;
    vertical-align: middle !important;
}

/* --- Slot states --- */
.bv-slot {
    height: 42px;
    width: 28px;
    min-width: 28px;
    cursor: default;
    padding: 0 !important;
    position: relative;
}

.bv-cell-hour {
    display: block;
    font-size: .6rem;
    font-weight: 700;
    line-height: 1;
    padding: 3px 1px 1px;
    color: rgba(0,0,0,.55);
    background: rgba(255,255,255,.3);
    letter-spacing: -.5px;
}

.bv-cell-res {
    display: block;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1;
    padding: 2px 2px 0;
    color: #fff;
    letter-spacing: -.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Free – clickable */
.bv-slot-free {
    background: #2e7d32;
    cursor: pointer;
    transition: background .1s;
}

.bv-slot-free:hover {
    background: #1b5e20;
}

.bv-slot-free .bv-cell-hour {
    color: rgba(255,255,255,.85);
    background: rgba(0,0,0,.15);
}

/* Drag selection */
.bv-slot-free.bv-selecting {
    background: #1b5e20;
    box-shadow: inset 0 0 0 2px #4caf50;
}

/* Own booking – red with white top border to distinguish from foreign */
.bv-slot-own {
    background: #b71c1c;
    border-top: 3px solid #fff !important;
}

.bv-slot-cancellable {
    cursor: pointer;
}

.bv-slot-cancellable:hover {
    background: #7f0000;
}

/* Foreign booking */
.bv-slot-taken {
    background: #b71c1c;
}

/* Past */
.bv-slot-past {
    background: #d0d0d0;
}

.bv-slot-past .bv-cell-hour {
    color: #666;
    background: transparent;
}

/* =========================================================
   Booking Modal
   ========================================================= */
.bv-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.bv-modal-overlay.is-open {
    display: flex;
}

.bv-modal {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.bv-modal h3 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    color: #111;
}

.bv-modal .bv-modal-close {
    position: absolute;
    top: .75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    line-height: 1;
}

.bv-modal .bv-modal-close:hover {
    color: #000;
}

.bv-form-row {
    margin-bottom: 1rem;
}

.bv-form-row label {
    display: block;
    font-weight: 700;
    margin-bottom: .3rem;
    font-size: .9rem;
    color: #111;
}

.bv-form-row input,
.bv-form-row select,
.bv-form-row textarea {
    width: 100%;
    padding: .4rem .6rem;
    border: 2px solid #888;
    border-radius: 4px;
    font-size: .9rem;
    box-sizing: border-box;
    color: #111;
}

.bv-form-row textarea {
    resize: vertical;
    min-height: 70px;
}

.bv-modal-actions {
    display: flex;
    gap: .75rem;
    margin-top: 1.25rem;
}

.bv-btn-primary {
    background: #0060a0;
    color: #fff;
    border: none;
    padding: .5rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
    transition: background .15s;
}

.bv-btn-primary:hover {
    background: #004878;
}

.bv-btn-secondary {
    background: #e0e0e0;
    color: #111;
    border: 2px solid #888;
    padding: .5rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    transition: background .15s;
}

.bv-btn-secondary:hover {
    background: #c8c8c8;
}

.bv-btn-danger {
    background: #b71c1c;
    color: #fff;
    border: none;
    padding: .5rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
    transition: background .15s;
}

.bv-btn-danger:hover {
    background: #7f0000;
}

.bv-end-inputs {
    display: flex;
    gap: .5rem;
}

.bv-end-inputs input[type="date"] {
    flex: 1 1 auto;
}

.bv-end-inputs select {
    flex: 0 0 80px;
}

.bv-modal-msg {
    margin-top: .75rem;
    font-size: .88rem;
    font-weight: 600;
    padding: .4rem .6rem;
    border-radius: 4px;
    display: none;
}

.bv-modal-msg.success {
    background: #1b5e20;
    color: #fff;
    display: block;
}

.bv-modal-msg.error {
    background: #7f0000;
    color: #fff;
    display: block;
}
