/**
 * Dog Walking Business — Public Booking Form Styles
 *
 * Uses CSS custom properties (--dwb-primary, --dwb-secondary, --dwb-accent)
 * set by the plugin's branding settings via inline CSS.
 */

/* ----------------------------------------
   Container
   ---------------------------------------- */
.dwb-booking-wrap {
    max-width: 720px;
    margin: 0 auto 40px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.dwb-booking-title {
    text-align: center;
    margin-bottom: 24px;
}

.dwb-booking-as-banner {
    text-align: center;
    background: #f0f7ff;
    border: 1px solid #c8ddf5;
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #1e3a5f;
}

/* ----------------------------------------
   Progress bar
   ---------------------------------------- */
.dwb-booking-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
}

.dwb-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.dwb-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s, color 0.3s;
}

.dwb-progress-step.active .dwb-step-number,
.dwb-progress-step.completed .dwb-step-number {
    background: var(--dwb-primary, #0073aa);
    color: #fff;
}

.dwb-progress-step.completed .dwb-step-number::after {
    content: "\2713";
}

.dwb-step-label {
    font-size: 11px;
    color: #888;
    text-align: center;
    white-space: nowrap;
}

.dwb-progress-step.active .dwb-step-label {
    color: var(--dwb-primary, #0073aa);
    font-weight: 600;
}

.dwb-progress-line {
    flex: 1;
    height: 2px;
    background: #ddd;
    min-width: 20px;
    max-width: 60px;
    margin: 0 4px;
    align-self: flex-start;
    margin-top: 15px;
}

/* ----------------------------------------
   Steps
   ---------------------------------------- */
.dwb-step {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.dwb-step h3 {
    margin: 0 0 20px;
    font-size: 20px;
    color: #23282d;
}

/* ----------------------------------------
   Service cards (Step 1)
   ---------------------------------------- */
.dwb-service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.dwb-service-card {
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.dwb-service-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dwb-service-card .dwb-card-inner {
    padding: 16px 20px;
}

.dwb-service-card:hover {
    border-color: var(--dwb-primary, #0073aa);
}

.dwb-service-card.selected {
    border-color: var(--dwb-primary, #0073aa);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
    background: rgba(0, 115, 170, 0.02);
}

.dwb-card-title {
    display: block;
    font-size: 16px;
    margin-bottom: 6px;
}

.dwb-card-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px;
}

.dwb-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dwb-card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--dwb-primary, #0073aa);
}

.dwb-card-duration {
    font-size: 12px;
    color: #888;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ----------------------------------------
   Form fields
   ---------------------------------------- */
.dwb-field {
    margin-bottom: 16px;
}

.dwb-field label,
.dwb-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}

.dwb-field label .required {
    color: #dc3232;
}

.dwb-field input[type="text"],
.dwb-field input[type="email"],
.dwb-field input[type="tel"],
.dwb-field input[type="date"],
.dwb-field select,
.dwb-field textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.dwb-field input:focus,
.dwb-field select:focus,
.dwb-field textarea:focus {
    border-color: var(--dwb-primary, #0073aa);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.12);
}

.dwb-field-hint {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.dwb-field-error {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 2px rgba(220, 50, 50, 0.12) !important;
}

/* ----------------------------------------
   Notices
   ---------------------------------------- */
.dwb-notice {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.dwb-notice-success {
    background: #edf8ee;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.dwb-notice-warning {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffecb3;
}

.dwb-notice-error {
    background: #fde8e8;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* ----------------------------------------
   Pets (Step 3)
   ---------------------------------------- */
.dwb-pet-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.dwb-pet-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.dwb-pet-checkbox:hover {
    border-color: var(--dwb-primary, #0073aa);
}

.dwb-pet-checkbox input:checked + span {
    font-weight: 600;
}

.dwb-new-pet-row {
    margin-bottom: 8px;
}

.dwb-field-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.dwb-field-inline input[type="text"],
.dwb-field-inline select {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    flex: 1;
    min-width: 100px;
}

.dwb-field-inline select {
    flex: 0 0 auto;
    min-width: 80px;
}

.dwb-btn-icon {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dwb-btn-icon:hover {
    background: #fde8e8;
    color: #c62828;
    border-color: #ffcdd2;
}

/* ----------------------------------------
   Time slots (Step 4)
   ---------------------------------------- */
.dwb-time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.dwb-time-slot {
    text-align: center;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    transition: border-color 0.2s, background 0.2s;
}

.dwb-time-slot input {
    display: none;
}

.dwb-time-slot:hover {
    border-color: var(--dwb-primary, #0073aa);
}

.dwb-time-slot.selected {
    background: var(--dwb-primary, #0073aa);
    color: #fff;
    border-color: var(--dwb-primary, #0073aa);
}

.dwb-loading {
    text-align: center;
    padding: 20px;
    color: #888;
}

/* ----------------------------------------
   Review (Step 5)
   ---------------------------------------- */
.dwb-review-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.dwb-review-details {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 8px 16px;
    margin: 0 0 20px;
}

.dwb-review-details dt {
    font-weight: 600;
    color: #555;
    font-size: 13px;
}

.dwb-review-details dd {
    margin: 0;
    font-size: 14px;
}

.dwb-price-breakdown h4 {
    margin: 16px 0 8px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
}

.dwb-price-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    color: #555;
}

.dwb-price-total {
    display: flex;
    justify-content: space-between;
    padding: 10px 0 0;
    margin-top: 8px;
    border-top: 2px solid #ddd;
    font-size: 18px;
}

/* ----------------------------------------
   Buttons
   ---------------------------------------- */
.dwb-step-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}

.dwb-btn {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.dwb-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dwb-btn-next,
.dwb-btn-submit {
    background: var(--dwb-primary, #0073aa);
    color: #fff;
    margin-left: auto;
}

.dwb-btn-next:hover:not(:disabled),
.dwb-btn-submit:hover:not(:disabled) {
    background: var(--dwb-secondary, #005a87);
}

.dwb-btn-back {
    background: #f0f0f0;
    color: #333;
}

.dwb-btn-back:hover {
    background: #e0e0e0;
}

.dwb-btn-outline {
    background: transparent;
    color: var(--dwb-primary, #0073aa);
    border: 1px solid var(--dwb-primary, #0073aa);
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.dwb-btn-outline:hover {
    background: rgba(0, 115, 170, 0.06);
}

/* ----------------------------------------
   Confirmation
   ---------------------------------------- */
.dwb-confirmation {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
}

.dwb-confirmation-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
}

.dwb-confirmation-icon,
.dwb-confirmation-icon.dwb-success {
    background: #edf8ee;
    color: #2e7d32;
}

.dwb-confirmation-icon.dwb-warning {
    background: #fff8e1;
    color: #f57f17;
}

.dwb-confirmation h3 {
    margin: 0 0 8px;
}

.dwb-confirmation-ref {
    margin-top: 16px;
    font-size: 14px;
    color: #666;
}

/* ----------------------------------------
   Payment Method Buttons (Confirmation)
   ---------------------------------------- */
.dwb-payment-info-section {
    margin-top: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.dwb-payment-info-section h4 {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.dwb-payment-methods-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dwb-payment-stack-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding: 14px 20px;
    background: var(--dwb-primary, #0073aa);
    color: #fff !important;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none !important;
    transition: opacity 0.15s, transform 0.1s;
    box-sizing: border-box;
}

.dwb-payment-stack-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.dwb-payment-stack-btn:active {
    transform: translateY(0);
}

.dwb-payment-stack-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}

.dwb-payment-stack-info strong {
    color: #1e293b;
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.dwb-payment-stack-info p {
    margin: 0 0 6px !important;
}

.dwb-payment-stack-info p:last-child {
    margin-bottom: 0 !important;
}

.dwb-preferred-badge {
    font-size: 0.8rem;
    color: var(--dwb-primary, #0073aa);
    font-weight: 600;
    margin-left: 4px;
}

.dwb-payment-stack-btn .dwb-preferred-badge {
    color: rgba(255, 255, 255, 0.75);
}

/* ----------------------------------------
   Responsive
   ---------------------------------------- */
@media screen and (max-width: 600px) {
    .dwb-step {
        padding: 20px 16px;
    }

    .dwb-service-cards {
        grid-template-columns: 1fr;
    }

    .dwb-time-slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .dwb-review-details {
        grid-template-columns: 1fr;
    }

    .dwb-review-details dt {
        margin-top: 8px;
    }

    .dwb-field-inline {
        flex-direction: column;
    }

    .dwb-field-inline input[type="text"],
    .dwb-field-inline select {
        width: 100%;
    }

    .dwb-step-label {
        display: none;
    }

    .dwb-progress-line {
        min-width: 12px;
    }
}
