/**
 * Frontend styles for Calendar Booking
 */
.scb-booking {
    font-family: "FG-Book";
}

.scb-booking-container {}

.scb-booking-header {
    text-align: center;
    margin-bottom: 30px;
}

.scb-booking-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2em;
}

.scb-booking-header p {
    color: #666;
    font-size: 1.1em;
}

.scb-booking-content {
    display: block;
    margin-bottom: 30px;
}

/* Calendar Styles */
.scb-calendar-section {
    background: #fff;
    border: none;
    padding: 0;
    margin-bottom: 30px;
}

.scb-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.scb-calendar-header h3 {
    font-size: 17px;
    font-weight: 400;
    font-family: "FG-Demi";
    line-height: 22px;
    text-align: start;
    text-size-adjust: 100%;
    margin-bottom: 0;
}

.scb-calendar-header-month {
    display: flex;
    align-items: center;
    gap: 0px;
}

.scb-calendar-nav,
.scb-nav-button {
    background: none;
    border: none;
    padding: 0 3px;
    cursor: pointer;
    width: 12px;
    /* height: 24px; */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: content-box;
}

.scb-calendar-nav:hover,
.scb-nav-button:hover {
}

.scb-calendar {
    width: 100%;
}

.scb-calendar button {
    background: none;
    border: none;
    cursor: pointer;
}

.scb-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 10px;
}

.scb-weekday {
    padding: 0 10px;
    text-align: center;
    font-weight: 600;
    color: #000;
}

.scb-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.scb-day {
    font-size: 16px;
    font-weight: 600;
    background: #fff;
    padding: 15px 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    border: 1px solid transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}



/* Available future days - light gray */
.scb-day-available {
    background: #F2F2F2 !important;
    color: #000 !important;
    cursor: pointer !important;
    opacity: 1 !important;
}

.scb-day-available:hover {
    background: #d0d0d0 !important;
}

.scb-day-available:active {
    background: #E30614 !important;
    color: white !important;
    border-color: #E30614 !important;
}

.scb-day-available:focus {
    background: #E30614 !important;
    color: white !important;
    border-color: #E30614 !important;
    outline: 2px solid #E30614;
    outline-offset: 2px;
}

/* Selected day - red */
.scb-day-selected {
    background: #E30614 !important;
    color: white !important;
    border-color: #E30614 !important;
}

.scb-day-available.scb-day-selected:hover {
    background: #E30614 !important;
}
/* Past days - dark gray */
.scb-day-past {
    background: #D9D9D9;
    color: rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
    opacity: 0.6;
}
.scb-day-past:hover {
    background: #D9D9D9;
    color: rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
    opacity: 0.6;
}


/* Fully booked days - black with stripes */
.scb-day-booked {
    background: #000;
    color: #fff;
    cursor: pointer;
    position: relative;
}

.scb-day-booked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 3px,
            rgba(255, 255, 255, 0.3) 3px,
            rgba(255, 255, 255, 0.3) 6px);
}

/* Unavailable days - dark gray */
.scb-day-weekend,
.scb-day-unavailable {
    background: #000;
    color: #fff;
    cursor: not-allowed;
    opacity: 1;
    position: relative;
    border: none;
}
.scb-day-weekend:hover,
.scb-day-unavailable:hover {
    background: #000;
    color: #fff;
    cursor: not-allowed;
}


/* Diagonalstreifen */
.scb-day-weekend::before,
.scb-day-unavailable::before {
    content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.2) 1px,
    transparent 2px,
    transparent 4px
  );
  z-index: 0;
}

/* Text im Vordergrund */
.scb-day-weekend span,
.scb-day-unavailable span {
    position: relative;
    z-index: 1;
}

.scb-day-available::before {
    content: '';
    background-image: none;
}


.scb-day-other {
    background: #f9f9f9;
    color: #ccc;
    cursor: default;
}

/* Form Styles */
.scb-form-section {
    background: #fff;
    border: none;
    padding: 0;
}

.scb-booking-form {
    width: 100%;
}

.scb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.scb-form-group {
    display: flex;
    flex-direction: column;
}

.scb-form-group-full {
    grid-column: 1 / -1;
}

.scb-form-half {
    grid-column: span 1;
}

/* Checkbox Styling */
.scb-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 15px 0;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 500;
}

.scb-checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    accent-color: #333;
}

.scb-checkbox-text {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* Dropdown Checkbox Styling */
.scb-dropdown-checkbox {
    position: relative;
    width: 100%;
}

.scb-dropdown-trigger {
    min-height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    border: 1.4px solid #000;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
}

.scb-dropdown-trigger:hover {
    border-color: #007cba;
}

.scb-dropdown-trigger:focus {
    outline: none;
    border-color: #007cba;
}

.scb-dropdown-text {
    flex: 1;
    color: #333;
    font-size: 16px;
    padding: 7px 0;
}

.scb-dropdown-arrow {
    width: 10px;
    height: 6px;
    background-image: url('../img/arrow-down.svg');
    background-repeat: no-repeat;
    background-size: 10px 6px;
    display: inline-block;
    color: transparent; /* hide fallback text */
    font-size: 0; /* hide fallback text */
}

.scb-dropdown-arrow-up {
    background-image: url('../img/arrow-up.svg');
}

.scb-checkbox-item {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #000;
}

.scb-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1.4px solid #000;
    border-top: none;
    z-index: 2;
    max-height: 240px;
    overflow-y: auto;
    display: none;
    
}

.scb-dropdown-content .scb-checkbox-item {
    margin-bottom: 0;
}

.scb-dropdown-content.scb-dropdown-open {
    display: block;
}



.scb-checkbox-item:last-child {
    border-bottom: none;
}

/* Custom square checkboxes (no border-radius) */
.scb-checkbox-item .scb-tour-checkbox,
.scb-checkbox-label input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 1.4px solid #000;
    border-radius: 0;
    background: #fff;
    display: inline-block;
    position: relative;
    margin: 0 0 0 0;
    cursor: pointer;
    padding: 8px;
}

.scb-checkbox-item .scb-tour-checkbox:focus-visible,
.scb-checkbox-label input[type="checkbox"]:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.scb-checkbox-item .scb-tour-checkbox:checked,
.scb-checkbox-label input[type="checkbox"]:checked {
    background: #000;
}

.scb-checkbox-item .scb-tour-checkbox:checked::after,
.scb-checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.scb-checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.scb-checkbox-option:last-child {
    border-bottom: none;
}

.scb-checkbox-option:hover {
    background-color: #f8f9fa;
}

.scb-checkbox-option input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.scb-checkbox-text {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.scb-paid-indicator {
    color: #e74c3c;
    font-weight: 600;
    font-size: 12px;
}


.scb-form-group label {
    margin-bottom: 5px;
    font-weight: 400;
    color: #333;
}

.scb-form-group input,
.scb-form-group select {
    height: 40px;
}

.scb-form-group input,
.scb-form-group select,
.scb-form-group textarea {
    padding: 0 12px;
    border: 1.4px solid #000;
    font-size: 16px;
    transition: border-color 0.3s;
}

/* Unify native select arrow with provided SVG */
.scb-form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('../img/arrow-down.svg');
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 10px 6px;
    padding-right: 36px;
}

/* Ensure number input spinners remain visible */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: auto;
    margin: initial;
}
input[type="number"] {
    -moz-appearance: auto;
}

.scb-form-group input:focus,
.scb-form-group select:focus,
.scb-form-group textarea:focus {
    outline: none;
    border-color: #2196f3;
}

.scb-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
}

.scb-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: auto;
}

.scb-checkbox-text {
    font-weight: normal;
}

.scb-disclaimer {
    margin: 20px 0;
    font-size: 12.7px;
    color: #000;
    line-height: 1.5;
}

.scb-form-submit {
}

.scb-submit-button {
    height: 20px;
    box-sizing: content-box;
    background: #000;
    color: white;
    border: none;
    padding: 10px 16px;
    font-size: 17px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.3s;
}

.scb-submit-button:hover {
    background: #555;
}

.scb-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Messages */
.scb-messages {
    margin-top: 20px;
    padding: 15px;
    font-weight: 500;
}

.scb-messages.scb-success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    padding: 20px;
}

.scb-messages.scb-success p {
    margin-bottom: 0;
}

.scb-messages.scb-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    padding: 20px;
}

.scb-messages ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.scb-messages li {
    margin-bottom: 5px;
}

/* Field Validation */
.scb-field-error {
    border-color: #dc3232 !important;
    background-color: #fff7f7;
}

.scb-field-error+.scb-field-error {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.scb-loading {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Ensure loading message spans entire calendar grid */
.scb-calendar-days .scb-loading {
    grid-column: 1 / -1;
}

.scb-error {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    color: #dc3232;
    background: #fff7f7;
    border: 1px solid #f5c6cb;
}

/* Mobile Touch Support */
@media (hover: none) and (pointer: coarse) {
    .scb-day-available:active {
        background: #E30614 !important;
        color: white !important;
        border-color: #E30614 !important;
        transform: scale(0.95);
        transition: all 0.1s ease;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .scb-booking-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .scb-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .scb-calendar-section,
    .scb-form-section {
    }

    .scb-day {
        padding: 10px 2px;
        min-height: 40px;
        font-size: 16px;
    }

    .scb-booking-container {
        padding: 10px;
    }
}

@media (max-width: 480px) {

    .scb-calendar-weekdays,
    .scb-calendar-days {
        gap: 3px;
    }

    .scb-weekday,
    .scb-day {
        border-right: none;
    }

    .scb-day {
        padding: 9px 2px;
        min-height: 35px;
        font-size: 16px;
    }
}

/* Success Popup Styles - Matching confirmation link design */
.scb-success-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scb-success-popup.scb-popup-show {
    opacity: 1;
    visibility: visible;
}

.scb-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.scb-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 2px solid #000;
    padding: 20px 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    text-align: center;
    position: relative;
    font-size: 18px;
    min-width: 300px;
}

.scb-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: #000;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.scb-popup-close:hover {
    background: #f0f0f0;
}

.scb-popup-message {
    font-size: 18px;
    color: #000;
    line-height: 1.4;
    margin: 0;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .scb-popup-content {
        padding: 15px 20px;
        max-width: 320px;
        font-size: 16px;
    }
    
    .scb-popup-message {
        font-size: 16px;
    }
}

/* Dynamic Person Fields Styles - Matching existing input design */
.scb-dynamic-person-fields {
    margin-top: 20px;
}
.scb-dynamic-person-fields .scb-form-group{
    margin-bottom: 15px;
}

.scb-dynamic-person-fields .scb-form-row {
    margin-bottom: 15px;
}

.scb-dynamic-person-fields .scb-form-row:last-child {
    margin-bottom: 0;
}

.scb-dynamic-person-fields label {
    color: #1d2327;
    margin-bottom: 5px;
    display: block;
}

.scb-dynamic-person-fields input[type="number"] {
    height: 40px;
    padding: 0 12px;
    border: 1.4px solid #000;
    font-size: 16px;
    transition: border-color 0.3s;
}

.scb-dynamic-person-fields input[type="number"]:focus {
    border-color: #000;
    outline: none;
    box-shadow: none;
}

.scb-dynamic-person-fields .scb-person-count-info {
    margin-top: 5px;
}

.scb-dynamic-person-fields .scb-field-description {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

.scb-day-event{
    background: #F3BC00 !important;
}
.scb-day-event.scb-day-selected{
    background: #E30614 !important;
}