/**
 * Boat Request Form - Frontend Styles
 */

/* Modal Wrapper */
.boat-request-modal {
    background: #fff;
    max-width: 720px;
    margin: 20px auto;
    padding: 0;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.boat-request-modal-inner {
    padding: 30px 40px 40px;
}

/* Header */
.boat-request-header {
    text-align: center;
    margin-bottom: 30px;
}

.boat-request-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1a1a1a;
}

.boat-request-subtitle {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Stepper */
.boat-request-stepper {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 35px;
    padding: 0 20px;
}

.boat-request-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 120px;
    position: relative;
}

.boat-request-step::after {
    content: '';
    position: absolute;
    top: 15px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background: #e0e0e0;
}

.boat-request-step:last-child::after {
    display: none;
}

.boat-request-step.active::after,
.boat-request-step.completed::after {
    background: #0073aa;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.boat-request-step.active .step-number,
.boat-request-step.completed .step-number {
    background: #0073aa;
    color: #fff;
}

.step-label {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    text-align: center;
    transition: color 0.3s ease;
}

.boat-request-step.active .step-label {
    color: #0073aa;
    font-weight: 600;
}

.boat-request-step.completed .step-label {
    color: #333;
}

/* Step Content */
.boat-request-step-content {
    display: none;
}

.boat-request-step-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Field Groups */
.boat-request-field-group {
    margin-bottom: 25px;
}

.boat-request-field-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.boat-request-field-half {
    flex: 1;
    margin-bottom: 0;
}

.boat-request-label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.boat-request-label .required {
    color: #dc3545;
}

.boat-request-hint {
    font-size: 13px;
    color: #666;
    margin: 5px 0 12px;
}

/* Form Inputs */
.boat-request-input,
.boat-request-select,
.boat-request-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.boat-request-input:focus,
.boat-request-select:focus,
.boat-request-textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.boat-request-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Checkboxes & Radio Buttons */
.boat-request-checkboxes,
.boat-request-radio-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.boat-request-checkbox-label,
.boat-request-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    min-height: 50px;
    box-sizing: border-box;
}

.boat-request-checkbox-label:hover,
.boat-request-radio-label:hover {
    border-color: #0073aa;
    background: #f8fcff;
}

.boat-request-checkbox-label input[type="checkbox"],
.boat-request-radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: #0073aa;
}

.boat-request-checkbox-label input:checked + .checkbox-text,
.boat-request-radio-label input:checked + .radio-text {
    color: #0073aa;
    font-weight: 500;
}

.boat-request-checkbox-label:has(input:checked),
.boat-request-radio-label:has(input:checked) {
    border-color: #0073aa;
    background: #e7f3ff;
}

.checkbox-text,
.radio-text {
    font-size: 14px;
    color: #333;
    line-height: 1.3;
}

/* Boat Types Grid */
.boat-request-boat-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* Experiences Grid - 3 columns */
.boat-request-experiences {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* Extras Grid - 4 columns for smaller items */
.boat-request-extras {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* Budget Radio - 4 columns */
.boat-request-budget {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* Quick Picks */
.boat-request-quick-picks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.quick-pick-option {
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
}

.quick-pick-option input {
    position: absolute;
    opacity: 0;
}

.quick-pick-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quick-pick-content strong {
    font-size: 15px;
    color: #1a1a1a;
}

.quick-pick-dates {
    font-size: 13px;
    color: #0073aa;
}

.quick-pick-desc {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.quick-pick-region {
    font-size: 11px;
    color: #888;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.quick-pick-region i {
    color: #0073aa;
}

/* Drilldown Taxonomy */
.boat-request-drilldown {
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.drilldown-breadcrumb {
    padding: 10px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.drilldown-breadcrumb a {
    color: #0073aa;
    text-decoration: none;
}

.drilldown-breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-home i {
    margin-right: 5px;
}

.breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 5px;
}

.breadcrumb-trail .breadcrumb-separator {
    color: #999;
}

.breadcrumb-trail .breadcrumb-item {
    color: #0073aa;
    cursor: pointer;
}

.breadcrumb-trail .breadcrumb-item:hover {
    text-decoration: underline;
}

.breadcrumb-trail .breadcrumb-current {
    color: #333;
    font-weight: 500;
}

.drilldown-selected {
    padding: 15px;
    background: #e7f3ff;
    border-bottom: 1px solid #b3d7f5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drilldown-selected .selected-label {
    color: #666;
    font-size: 13px;
}

.drilldown-selected .selected-value {
    font-weight: 600;
    color: #0073aa;
    font-size: 15px;
}

.drilldown-selected .selected-change {
    margin-left: auto;
    font-size: 13px;
    color: #0073aa;
}

.drilldown-levels {
    position: relative;
}

.drilldown-level {
    display: none;
}

.drilldown-level.active {
    display: block;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.drilldown-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}

.drilldown-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

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

.drilldown-item:hover {
    background: #f8fcff;
}

.drilldown-item.selected {
    background: #e7f3ff;
}

.drilldown-item .item-name {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.drilldown-item .item-arrow {
    color: #999;
    font-size: 12px;
    transition: transform 0.2s;
}

.drilldown-item:hover .item-arrow {
    color: #0073aa;
    transform: translateX(3px);
}

.drilldown-item.has-children .item-name {
    font-weight: 500;
}

/* Loading state for drilldown */
.drilldown-level.loading {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drilldown-level.loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid #e0e0e0;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* "Select this region" parent option */
.drilldown-select-parent {
    background: #f0f8ff;
    border-bottom: 2px solid #0073aa !important;
}

.drilldown-select-parent .item-check {
    color: #0073aa;
    font-size: 16px;
    margin-right: 8px;
}

.drilldown-select-parent .item-name {
    color: #0073aa;
    font-weight: 600;
}

.drilldown-select-parent:hover {
    background: #e0f0ff;
}

/* Custom Location Fallback */
.brf-custom-location {
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 8px;
}

.brf-custom-location-hint {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px;
}

.brf-custom-location-hint i {
    color: #0073aa;
    margin-right: 5px;
}

.brf-custom-location .boat-request-field-row {
    margin-bottom: 0;
}

.brf-custom-location .boat-request-field-group {
    margin-bottom: 0;
}

/* Date Tabs */
.boat-request-dates-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    background: #f5f5f5;
    padding: 5px;
    border-radius: 8px;
}

.dates-tab {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.dates-tab:hover {
    color: #333;
}

.dates-tab.active {
    background: #fff;
    color: #0073aa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Date Panels */
.boat-request-dates-panel {
    display: none;
}

.boat-request-dates-panel.active {
    display: block;
}

.boat-request-date-range {
    display: flex;
    gap: 20px;
}

.date-field {
    flex: 1;
}

.date-field label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.boat-request-flexible-dates {
    display: flex;
    gap: 20px;
}

.flex-field {
    flex: 1;
}

.flex-field label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

/* Guests Input */
.boat-request-guests-input {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.guests-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: #f5f5f5;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.guests-btn:hover {
    background: #e0e0e0;
}

.boat-request-guests-input input {
    width: 60px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 600;
    -moz-appearance: textfield;
}

.boat-request-guests-input input::-webkit-outer-spin-button,
.boat-request-guests-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Review Section */
.boat-request-review {
    padding: 0;
}

.boat-request-review-intro {
    font-size: 15px;
    color: #666;
    margin-bottom: 25px;
}

.boat-request-review-section {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.boat-request-review-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 15px;
    font-size: 16px;
    color: #1a1a1a;
}

.boat-request-review-section h4 i {
    color: #0073aa;
}

.review-edit-link {
    margin-left: auto;
    font-size: 13px;
    font-weight: normal;
    color: #0073aa;
    text-decoration: none;
}

.review-edit-link:hover {
    text-decoration: underline;
}

.boat-request-review-list {
    margin: 0;
    display: grid;
    gap: 10px;
}

.boat-request-review-list dt {
    font-size: 13px;
    color: #666;
    margin-bottom: 2px;
}

.boat-request-review-list dd {
    margin: 0 0 10px;
    font-size: 15px;
    color: #1a1a1a;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.boat-request-review-list dd:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Consent */
.boat-request-consent {
    margin-top: 20px;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.boat-request-consent .checkbox-text {
    font-size: 13px;
}

.boat-request-consent a {
    color: #0073aa;
}

/* Navigation */
.boat-request-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.boat-request-nav .button {
    padding: 12px 25px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.boat-request-prev {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #333;
}

.boat-request-prev:hover {
    background: #e8e8e8;
}

.boat-request-next,
.boat-request-submit {
    background: #0073aa;
    border: 1px solid #0073aa;
    color: #fff;
    margin-left: auto;
}

.boat-request-next:hover,
.boat-request-submit:hover {
    background: #005a87;
    border-color: #005a87;
}

.boat-request-submit {
    background: #28a745;
    border-color: #28a745;
}

.boat-request-submit:hover {
    background: #218838;
    border-color: #218838;
}

/* Error Messages */
.boat-request-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 6px;
    display: none;
}

.boat-request-error.visible {
    display: block;
}

.boat-request-field-group.has-error .boat-request-input,
.boat-request-field-group.has-error .boat-request-select {
    border-color: #dc3545;
}

/* Success Message */
.boat-request-success {
    text-align: center;
    padding: 40px 20px;
}

.boat-request-success-icon {
    font-size: 60px;
    color: #28a745;
    margin-bottom: 20px;
}

.boat-request-success h3 {
    font-size: 24px;
    margin: 0 0 10px;
    color: #1a1a1a;
}

.boat-request-success p {
    color: #666;
    font-size: 16px;
    margin: 0 0 25px;
}

/* Button Wrapper Alignment */
.boat-request-button-wrap {
    display: flex;
    width: 100%;
}

.boat-request-button-wrap.align-left {
    justify-content: flex-start;
}

.boat-request-button-wrap.align-center {
    justify-content: center;
}

.boat-request-button-wrap.align-right {
    justify-content: flex-end;
}

/* Trigger Button */
.boat-request-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.boat-request-trigger:hover {
    background: #005a87;
    color: #fff;
}

/* Loading State */
.boat-request-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.boat-request-submit.loading {
    position: relative;
}

.boat-request-submit.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .boat-request-modal {
        margin: 10px;
        border-radius: 8px;
    }

    .boat-request-modal-inner {
        padding: 20px;
    }

    .boat-request-header h2 {
        font-size: 22px;
    }

    .boat-request-stepper {
        gap: 5px;
        padding: 0;
    }

    .step-label {
        font-size: 10px;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .boat-request-field-row {
        flex-direction: column;
        gap: 0;
    }

    .boat-request-field-half {
        margin-bottom: 25px;
    }

    .boat-request-date-range,
    .boat-request-flexible-dates {
        flex-direction: column;
        gap: 15px;
    }

    .boat-request-boat-types,
    .boat-request-checkboxes,
    .boat-request-radio-group,
    .boat-request-experiences {
        grid-template-columns: repeat(2, 1fr);
    }

    .boat-request-extras,
    .boat-request-budget {
        grid-template-columns: repeat(2, 1fr);
    }

    .boat-request-quick-picks {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .boat-request-boat-types,
    .boat-request-checkboxes,
    .boat-request-radio-group,
    .boat-request-experiences,
    .boat-request-extras,
    .boat-request-budget {
        grid-template-columns: 1fr;
    }

    .boat-request-nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .boat-request-nav .button {
        flex: 1;
        justify-content: center;
    }

    .boat-request-next,
    .boat-request-submit {
        margin-left: 0;
    }
}

/* Magnific Popup Overrides */
.mfp-bg {
    background: rgba(0, 0, 0, 0.6);
}

.mfp-close {
    opacity: 1;
    color: #999;
    font-size: 28px;
    right: 10px;
    top: 10px;
}

.mfp-close:hover {
    color: #333;
}

/* Flatpickr Customization */
.flatpickr-calendar {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: #0073aa;
    border-color: #0073aa;
}

.flatpickr-day.inRange {
    background: #e7f3ff;
    border-color: #e7f3ff;
}

/* Phone Code + Number Wrapper */
.brf-phone-wrap {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.brf-phone-wrap .brf-phone-code {
    flex: 0 0 145px;
    max-width: 145px;
    padding: 10px 8px;
    font-size: 14px;
}

.brf-phone-wrap .boat-request-input {
    flex: 1;
    min-width: 0;
}

@media (max-width: 480px) {
    .brf-phone-wrap {
        flex-direction: column;
    }

    .brf-phone-wrap .brf-phone-code {
        flex: none;
        max-width: 100%;
    }
}

/* Custom Close X Button (top-right) */
.brf-close-x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding: 0;
}

.brf-close-x:hover {
    background: #e0e0e0;
    color: #333;
}

/* Close Button (bottom) */
.boat-request-close-wrap {
    text-align: center;
    margin-top: 15px;
}

.boat-request-close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 20px;
    transition: color 0.2s;
    text-decoration: underline;
}

.boat-request-close-btn:hover {
    color: #333;
}

/* Dialog Overlays (Recovery Prompt & Close Confirmation) */
.brf-dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    border-radius: 12px;
}

.brf-dialog {
    text-align: center;
    max-width: 400px;
    padding: 30px;
}

.brf-dialog-icon {
    font-size: 48px;
    color: #0073aa;
    margin-bottom: 15px;
}

.brf-dialog-icon .fa-question-circle {
    color: #e6a117;
}

.brf-dialog h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1a1a1a;
}

.brf-dialog p {
    font-size: 15px;
    color: #666;
    margin: 0 0 25px;
    line-height: 1.5;
}

.brf-dialog-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.brf-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.brf-btn-primary {
    background: #0073aa;
    color: #fff;
}

.brf-btn-primary:hover {
    background: #005a87;
}

.brf-btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.brf-btn-secondary:hover {
    background: #e8e8e8;
}

@media (max-width: 480px) {
    .brf-dialog {
        padding: 20px 15px;
    }

    .brf-dialog-icon {
        font-size: 36px;
    }

    .brf-dialog h3 {
        font-size: 18px;
    }

    .brf-dialog p {
        font-size: 14px;
    }

    .brf-dialog-buttons {
        flex-direction: column;
    }

    .brf-btn {
        justify-content: center;
    }
}
