/* File: public/assets/css/style.css */
/* The Modal (background) */
.sbm-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    overflow: auto;
    display: none;

    /* Centering rules */
    align-items: center;
    justify-content: center;

    /* Force the modal to occupy the full viewport, ignoring theme constraints. */
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
}

.sbm-modal.is-visible {
    display: flex;
}

body.sbm-modal-open {
    overflow: hidden;
}

.sbm-modal-image {
    display: block;
    margin: 0 auto 10px;
    max-width: 130px;
    max-height: 130px;
}

/* Modal Content/Box */
.sbm-modal-content {
    background-color: #ffffff;
    width: calc(100% - 64px);
    height: 100%;
    max-width: 380px;
    max-height: calc(100% - 64px);
    position: relative;
    padding: 20px 24px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sbm-modal-content #booking-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* The Close Button */
.sbm-close-btn {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}

.sbm-close-btn:hover,
.sbm-close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Form Steps */
.sbm-form-step {
    flex: 1;
    display: none;
    overflow: hidden;
}

.sbm-form-step.active-step {
    display: flex;
    flex-direction: column;
}

.sbm-modal-header {
    text-align: right;
    margin-bottom: 20px;
}

/* Container for the two main buttons */
.sbm-welcome-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Common style for the welcome buttons */
.sbm-modal .sbm-welcome-button {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    box-shadow: none;
    text-shadow: none;
    line-height: normal;
    text-align: center;
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Hover state for welcome button */
.sbm-modal .sbm-welcome-button:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Modal footer style */
.sbm-modal-footer {
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.sbm-modal-footer p {
    font-size: 12px;
    color: #888;
    margin: 0;
}

/* Change align to simple texts */
.sbm-form-step[data-step="2"] p,
.sbm-form-step[data-step="3"] p {
    text-align: left;
}

/* The main wrapper */
.sbm-select-container {
    position: relative;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* The label (no changes here) */
.sbm-select-label {
    position: absolute;
    top: -8px;
    left: 12px;
    background-color: #ffffff;
    padding: 0 5px;
    font-size: 12px;
    color: #6c757d;

    /* Keep it above the box */
    z-index: 5;
}

/* The visible "fake" select box */
.sbm-custom-select {
    position: relative;

    /* For the arrow */
    min-height: 48px;
    height: auto;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background-color: #fff;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    color: #212529;
}

/* The custom arrow for the "fake" box */
.sbm-custom-select::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #888;
    transition: transform 0.2s ease;
}

/* Rotate arrow when open */
.sbm-custom-select.is-open::after {
    transform: translateY(-50%) rotate(180deg);
}

/* The panel that contains the options */
.sbm-select-options {
    /* Hidden by default */
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sbm-select-options.is-open {
    /* Show when open */
    display: block;
}

/* Styling for the list and items */
.sbm-select-options ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sbm-select-options li {
    padding: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sbm-select-options li:hover {
    background-color: #f0f0f0;
}

.sbm-select-options li.selected {
    /* Selected color */
    background-color: #e0e7ff;
    font-weight: bold;
}

/* Container for scrollable service list */
.sbm-service-list-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100%;
    -webkit-overflow-scrolling: touch;
    padding-right: 12px;
    box-sizing: content-box;
}

/* Hide the actual checkbox input */
.sbm-service-radio {
    display: none;
}

/* Base style for each service card */
.sbm-service-item {
    /* Use flexbox for alignment of icon and text */
    display: flex;
    /* Vertically align items in the center */
    align-items: center;
    /* Light grey background for unselected */
    background-color: #f7fafc;
    /* Border color matches background */
    border: 2px solid #f7fafc;
    border-radius: 12px;
    /* Ample padding inside the card */
    padding: 15px;
    /* Space between cards */
    margin-bottom: 12px;
    cursor: pointer;
    /* Smooth transition for hover/selection */
    transition: all 0.2s ease-in-out;
    /* Ensure text aligns left within the card */
    text-align: left;
}

/* Hover state for service cards */
.sbm-service-item:hover {
    /* Lighter grey border on hover */
    border-color: #a0aec0;
}

/* SELECTED state for service cards */
.sbm-service-item.sbm-service-item-selected {
    /* Green border for selected card */
    border-color: #68d391;
    /* White background for selected card */
    background-color: #ffffff;
}

/* Content layout (icon + text) */
.sbm-service-item-content {
    display: flex;
    /* Align text to top if multiple lines */
    align-items: center;
    /* Ensure content takes full width */
    width: 100%;
}

/* Icon styling */
.sbm-service-icon {
    /* Larger icon size */
    width: 38px;
    height: 38px;
    /* Space between icon and text */
    margin-right: 15px;
    /* Prevent icon from shrinking */
    flex-shrink: 0;
}

/* Text container for name and description */
.sbm-service-text {
    display: flex;
    /* Stack name and description vertically */
    flex-direction: column;
    /* Allow text to take remaining space */
    flex-grow: 1;
}

/* Service Name (title) */
.sbm-service-name {
    /* Bold */
    font-weight: 700;
    /* Dark text color */
    color: #2d3748;
    /* Slightly larger font */
    font-size: 1.05rem;
    line-height: 1.3;
    /* Space between name and description */
    margin-bottom: 4px;
}

/* Service Description */
.sbm-service-description {
    /* Smaller font for description */
    font-size: 0.875rem;
    /* Grey text color */
    color: #718096;
    line-height: 1.4;
}

/* Container for the step navigation buttons */
.sbm-step-nav {
    display: flex;
    justify-content: space-between;
    /* Space between buttons */
    gap: 15px;
    margin-top: auto;
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Base style for all navigation buttons */
.sbm-modal .sbm-nav-btn {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    border: 2px solid #007bff;
    transition: all 0.2s ease;
    box-shadow: none;
    text-shadow: none;
    line-height: normal;
}

/* Style for the "Next" and "Submit" buttons (primary) */
.sbm-modal .sbm-nav-btn.sbm-next-btn,
.sbm-modal .sbm-nav-btn[type="submit"] {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.sbm-modal .sbm-nav-btn:disabled {
    background-color: #a0aec0;
    border-color: #a0aec0;
    cursor: not-allowed;
    opacity: 0.7;
    color: white;
}

.sbm-modal .sbm-nav-btn.sbm-next-btn:hover,
.sbm-modal .sbm-nav-btn[type="submit"]:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Style for the "Previous" button (secondary) */
.sbm-modal .sbm-nav-btn.sbm-prev-btn {
    background-color: transparent;
    color: #007bff;
    border-color: #007bff;
}

.sbm-modal .sbm-nav-btn.sbm-prev-btn:hover {
    background-color: #e7f1ff;
    border-color: #007bff;
}

/* This makes the details list scrollable if needed */
.sbm-service-details-list {
    flex: 1;
    overflow-y: auto;
    margin: 0 -24px;
    padding: 0 24px;
    text-align: left;
}

/* A container for each selected service (card + text area) */
.sbm-service-summary-item {
    margin-bottom: 25px;
}

/* Make the summary card non-interactive */
.sbm-service-summary-item .sbm-service-item {
    cursor: default;
    /* Always white */
    background-color: #ffffff;
    /* A light grey border */
    border-color: #e2e8f0;
}

.sbm-service-summary-item .sbm-service-item:hover {
    /* No color change on hover */
    border-color: #e2e8f0;
}

/* The prompt text below the card */
.sbm-service-details-prompt {
    font-size: 0.9rem;
    color: #4a5568;
    margin-top: 15px;
    margin-bottom: 8px;
    font-weight: 500;
}

/* The text area for user input */
.sbm-service-details-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    /* Allows user to resize it vertically */
    resize: vertical;
}

/* The main drop zone container */
.sbm-drop-zone {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-top: 15px;
}

/* Style when a file is being dragged over the zone */
.sbm-drop-zone.is-active {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.sbm-drop-zone p {
    margin: 10px 0;
    color: #6c757d;
}

.sbm-drop-zone .drop-zone-icon {
    font-size: 24px;
    color: #a0aec0;
}

/* Hide the real file input */
.sbm-file-input {
    display: none;
}

/* "Browse File" button style */
.sbm-browse-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
}

.sbm-browse-btn:hover {
    background-color: #f8f9fa;
}

/* Container for the list of selected files */
.sbm-file-preview {
    margin-top: 15px;
    text-align: left;
}

/* Each item in the preview list */
.file-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #2d3748;
    background-color: #f7fafc;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 5px;
}

/* The 'remove' button (X) for each file */
.remove-file-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #c53030;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

/* Calendar Styles */
.sbm-calendar-wrapper {
    max-width: 400px;
    margin: 0 auto;
}

/* Container for scrollable calendar list */
.sbm-calendar-scroll-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100%;
    -webkit-overflow-scrolling: touch;
    /* Added padding for better spacing */
    padding: 10px 5px 10px 0;
    box-sizing: content-box;
}

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

.sbm-calendar-header h4 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

.sbm-modal .sbm-calendar-nav {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.8em;
    line-height: 1;
    color: #a0aec0;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;

    /* Resets */
    box-shadow: none;
    text-shadow: none;
}

.sbm-modal .sbm-calendar-nav:hover {
    color: #4a5568;
    background-color: #f7fafc;
}

.sbm-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    /* More space between days */
    gap: 8px;
    text-align: center;
}

.sbm-calendar-grid.sbm-weekdays {
    font-weight: bold;
    /* Lighter weekday names */
    color: #a0aec0;
    margin-bottom: 12px;
}

.sbm-calendar-day {
    padding: 5px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: default;
    /* Disabled color */
    color: #cbd5e0;
    font-weight: 500;
}

/* Day States to match the image */
.sbm-calendar-day.is-available {
    /* Lighter, pastel green */
    background-color: #eaf5e1;
    /* Darker green text */
    color: #3f6212;
    cursor: pointer;
    font-weight: 600;
}

.sbm-calendar-day.is-available:hover {
    background-color: #d8e9cc;
}

.sbm-calendar-day.is-selected {
    /* A strong, modern green */
    background-color: #4d7c0f;
    color: #fff;
}

.sbm-calendar-day.is-past {
    color: #e2e8f0;
    /* Removed line-through for a cleaner look */
    text-decoration: none;
}

.sbm-calendar-day.is-today {
    /* A softer blue for today */
    border: 2px solid #60a5fa;
    /* Adjust padding to account for border */
    padding: 3px;
}

/* Time Slot Styles */
.sbm-time-slots-wrapper {
    margin-top: 25px;
    padding-top: 20px;
    /* A subtle separator */
    border-top: 1px solid #f0f0f0;
}

#sbm-time-slots-title {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #555;
}

.sbm-time-slots-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.sbm-modal .sbm-time-slot {
    background-color: transparent;
    border: 1px solid #cbd5e0;
    color: #4a5568;
    border-radius: 6px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: none;
    text-shadow: none;
    line-height: normal;
}

.sbm-modal .sbm-time-slot:hover {
    background-color: #edf2f7;
    border-color: #a0aec0;
    color: #2d3748;
}

.sbm-modal .sbm-time-slot.is-selected {
    background-color: #3b82f6;
    color: #fff;
    border-color: #2563eb;
    font-weight: bold;
}

.sbm-summary-container {
    flex: 1;
    overflow-y: auto;
    text-align: left;
    margin: 0 -24px;
    padding: 0 24px;
}

.sbm-summary-section {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.sbm-summary-section:last-child {
    border-bottom: none;
}

.sbm-summary-title {
    font-weight: bold;
    color: #2d3748;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.sbm-summary-content p {
    margin: 0 0 5px;
}

.sbm-summary-content b {
    color: #4a5568;
    margin-right: 8px;
}

/* Summary styles for selected services */
.sbm-summary-service-block {
    margin-bottom: 15px;
}

.sbm-summary-service-block .sbm-service-name {
    font-weight: bold;
}

.sbm-summary-service-block .sbm-service-details-note {
    font-style: italic;
    color: #666;
    margin-left: 15px;
}

.sbm-summary-service-block .sbm-summary-file-list {
    font-size: 0.85rem;
    margin-left: 15px;
    color: #007bff;
}

.sbm-summary-item-with-icon {
    display: flex;
    /* Vertically centers the icon with the text */
    align-items: center;
    margin-bottom: 8px;
}

.sbm-summary-icon {
    width: 20px;
    height: 20px;
    /* Space between icon and text */
    margin-right: 12px;
    flex-shrink: 0;
}

.sbm-step-subtitle {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
}

.sbm-form-fields-container {
    flex: 1;
    overflow-y: auto;
    margin: 0 -15px;
    padding: 0 15px;
    text-align: left;
}

.sbm-form-group {
    margin-bottom: 15px;
}

.sbm-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #4a5568;
}

.sbm-form-group input[type="text"],
.sbm-form-group input[type="email"],
.sbm-form-group input[type="tel"],
.sbm-form-group select,
.sbm-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
}

.sbm-form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.required {
    color: #e53e3e;
}

/* Two-column layout */
.sbm-form-row {
    display: flex;
    gap: 15px;
}

.sbm-form-row .sbm-form-group {
    flex: 1;
}

/* Checkbox layout */
.sbm-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sbm-checkbox-group input[type="checkbox"] {
    width: auto;
}

.sbm-form-subtitle {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 15px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.sbm-hidden {
    display: none !important;
}

.sbm-form-group select {
    /* Apply base styles to match text inputs */
    background-color: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 10px;
    padding-right: 35px;
    /* Add extra space on the right for the arrow */
    font-size: 1rem;
    color: #2d3748;
    width: 100%;

    /* Hide the default browser arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Add custom arrow as a background image */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 12px;
}

.sbm-error-box {
    background-color: #fff5f5;
    border: 1px solid #d63638;
    color: #c53030;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.sbm-success-box {
    background-color: #f0fff4;
    border: 1px solid #68d391;
    color: #2f855a;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}