:root {
    --turquoise: #00bcd4;
    --turquoise-deep: #00838f;
    --turquoise-dark: #006064;
    --turquoise-light: #4dd0e1;
    --turquoise-soft: #b2ebf2;
    --turquoise-bg: #e0f7fa;
    --beach: #81d4fa;
    --beach-soft: #e1f5fe;
    --sand: #fff8e1;
    --bg: #f4fdff;
    --card-bg: #ffffff;
    --text: #0f3a44;
    --text-secondary: #4a6e76;
    --text-muted: #8aa9b0;
    --border: #d8eef2;
    --green: #2e7d32;
    --green-bg: #c8e6c9;
    --yellow-bg: #fff9c4;
    --yellow-text: #b28704;
    --orange-bg: #ffccbc;
    --orange-text: #d84315;
    --red: #d84343;
    --red-bg: #fde0e0;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 2px 8px rgba(0, 96, 100, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 96, 100, 0.12);
    --shadow-lg: 0 12px 36px rgba(0, 96, 100, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: transparent; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.45;
}

.widget-container {
    max-width: 520px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

/* --- Header with surf gradient + waves --- */
.widget-header {
    position: relative;
    padding: 22px 24px 18px;
    background: linear-gradient(135deg, var(--turquoise-dark) 0%, var(--turquoise-deep) 50%, var(--turquoise) 100%);
    color: #fff;
    overflow: hidden;
}

.widget-header::before {
    content: "";
    position: absolute;
    inset: auto 0 -1px 0;
    height: 22px;
    background-repeat: repeat-x;
    background-size: 120px 22px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 22' preserveAspectRatio='none'><path d='M0 14 Q30 0 60 14 T120 14 V22 H0 Z' fill='%23ffffff'/></svg>");
    opacity: 0.95;
}

.widget-header-inner {
    position: relative;
    z-index: 2;
    text-align: center;
}

.widget-logo {
    display: block;
    max-height: 64px;
    max-width: 200px;
    width: auto;
    margin: 0 auto 10px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
}

.widget-title {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.widget-subtitle {
    font-size: 13px;
    opacity: 0.92;
    margin-bottom: 14px;
}

.progress-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 3px;
    transition: width 0.45s cubic-bezier(.2,.7,.2,1);
    width: 14%;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.step-info {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 8px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

/* --- Body --- */
.widget-body {
    padding: 24px 22px 20px;
    background: var(--bg);
    flex: 1;
}

/* --- Footer --- */
.widget-footer {
    padding: 16px 22px 20px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

.widget-footer.hidden { display: none; }

/* --- Buttons --- */
.btn {
    padding: 14px 20px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: none;
    flex: 1;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-next {
    background: linear-gradient(135deg, var(--turquoise-deep) 0%, var(--turquoise) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 131, 143, 0.35);
}

.btn-next:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 131, 143, 0.45);
}

.btn-next:active:not(:disabled) { transform: translateY(0); }

.btn-back {
    background: transparent;
    color: var(--turquoise-deep);
    border: 2px solid var(--border);
    flex: 0 0 110px;
}

.btn-back:hover { background: var(--turquoise-bg); border-color: var(--turquoise-light); }

.btn-back.hidden { display: none; }

/* --- Step title --- */
.step-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--turquoise-dark);
}

/* --- Cards --- */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 420px) {
    .card-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}

.card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    position: relative;
}

.card:hover {
    border-color: var(--turquoise-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.card.selected {
    border-color: var(--turquoise);
    background: var(--turquoise-bg);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.2);
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--turquoise-deep);
}

.card-price-detail {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.card-badge {
    display: inline-block;
    font-size: 11px;
    background: var(--sand);
    color: #8d6e00;
    padding: 3px 10px;
    border-radius: 999px;
    margin-top: 8px;
    font-weight: 600;
}

.card-duration {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* --- Calendar --- */
.calendar { margin-top: 4px; }

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

.calendar-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--turquoise-dark);
}

.calendar-nav {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: 18px;
    color: var(--turquoise-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.calendar-nav:hover { background: var(--turquoise-bg); border-color: var(--turquoise-light); }

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 6px;
}

.calendar-weekday {
    font-size: 11px;
    color: var(--text-muted);
    padding: 6px 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 500;
    cursor: default;
    transition: background 0.15s, color 0.15s, transform 0.1s;
}

.calendar-day.available {
    cursor: pointer;
    color: var(--turquoise-deep);
    font-weight: 600;
    background: var(--turquoise-bg);
}

.calendar-day.available:hover {
    background: var(--turquoise-soft);
    transform: scale(1.05);
}

.calendar-day.selected {
    background: linear-gradient(135deg, var(--turquoise-deep), var(--turquoise));
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 131, 143, 0.4);
    font-weight: 700;
}

.calendar-day.disabled {
    color: var(--text-muted);
    opacity: 0.45;
}

.calendar-day.today:not(.selected) {
    box-shadow: inset 0 0 0 2px var(--turquoise);
}

.calendar-day.weekend.available { color: var(--turquoise-dark); }

/* --- Slots --- */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.slot-chip {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: var(--card-bg);
}

.slot-chip:hover {
    border-color: var(--turquoise-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.slot-chip.selected {
    border-color: var(--turquoise);
    background: var(--turquoise-bg);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.2);
}

.slot-time {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.slot-available {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
    font-weight: 500;
}

/* --- Quantity --- */
.qty-section { text-align: center; padding: 16px 0 8px; }

.qty-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin: 22px 0;
}

.qty-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--turquoise);
    background: transparent;
    color: var(--turquoise-deep);
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover:not(:disabled) {
    background: var(--turquoise);
    color: #fff;
    transform: scale(1.05);
}

.qty-btn:disabled {
    border-color: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

.qty-value {
    font-size: 52px;
    font-weight: 800;
    color: var(--turquoise-dark);
    min-width: 70px;
    line-height: 1;
}

.qty-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* --- Form --- */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    color: var(--text);
    background: var(--card-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--turquoise);
    box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.15);
}

.form-input.error { border-color: var(--red); }

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.form-error {
    font-size: 12px;
    color: var(--red);
    margin-top: 5px;
}

.required::after {
    content: ' *';
    color: var(--red);
}

/* --- Summary --- */
.summary-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

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

.summary-label {
    color: var(--text-secondary);
    font-size: 13px;
    flex: 0 0 auto;
}

.summary-value {
    font-weight: 600;
    font-size: 14px;
    text-align: right;
    color: var(--text);
    flex: 1;
}

.summary-total {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--turquoise-deep), var(--turquoise));
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0, 131, 143, 0.3);
}

/* --- Result --- */
.result-container {
    text-align: center;
    padding: 32px 20px 24px;
}

.result-icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 42px;
    box-shadow: var(--shadow-md);
}

.result-icon.success {
    background: var(--green-bg);
    color: var(--green);
}

.result-icon.error {
    background: var(--red-bg);
    color: var(--red);
}

.result-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--turquoise-dark);
}

.result-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Loading --- */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid var(--turquoise-soft);
    border-top-color: var(--turquoise);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

/* --- Empty --- */
.empty-state {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 14px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

/* --- Animations --- */
.fade-in { animation: fadeIn 0.35s ease; }

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

/* --- Alerts --- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
}

.alert-error {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid #f5b9b9;
}

/* --- Payment --- */
.payment-section { margin-top: 18px; text-align: center; }

.payment-notice {
    font-weight: 600;
    color: var(--orange-text);
    margin-bottom: 12px;
    font-size: 14px;
}

.btn-pay {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--turquoise-deep), var(--turquoise));
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 6px 18px rgba(0, 131, 143, 0.35);
    transition: transform 0.15s, box-shadow 0.2s;
}

.btn-pay:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0, 131, 143, 0.45); }

.payment-hint {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.payment-confirmed {
    font-weight: 700;
    color: var(--green);
    margin-top: 8px;
    font-size: 15px;
}

/* --- Mobile --- */
@media (max-width: 480px) {
    .widget-container {
        max-width: 100%;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
    .widget-header { padding: 18px 18px 14px; }
    .widget-body { padding: 20px 16px; }
    .widget-footer { padding: 14px 16px 18px; }
    .widget-logo { max-height: 56px; }
    .qty-value { font-size: 44px; }
}
