/**
 * Amber Booking - Frontend Styles
 */

:root {
    --amber-primary: #008ca8;
    --amber-primary-dark: #006d83;
    --amber-secondary: #008ca8;
    --amber-light: #f8f9fa;
    --amber-border: #ddd;
    --amber-text: #333;
    --amber-text-light: #666;
    --amber-success: #28a745;
    --amber-warning: #ffc107;
    --amber-error: #dc3545;
}

.amber-booking-form { max-width: 900px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.amber-booking-form * { box-sizing: border-box; }

/* Steps */
.amber-steps { display: flex; margin-bottom: 30px; }
.amber-step { flex: 1; text-align: center; padding: 15px; position: relative; }
.amber-step::after { content: ''; position: absolute; top: 50%; right: 0; width: 50%; height: 2px; background: var(--amber-border); }
.amber-step:last-child::after { display: none; }
.amber-step::before { content: ''; position: absolute; top: 50%; left: 0; width: 50%; height: 2px; background: var(--amber-border); }
.amber-step:first-child::before { display: none; }
.amber-step-number { width: 36px; height: 36px; line-height: 36px; border-radius: 50%; background: var(--amber-light); border: 2px solid var(--amber-border); margin: 0 auto 8px; font-weight: 600; position: relative; z-index: 1; }
.amber-step.active .amber-step-number { background: #fff; color: var(--amber-primary-dark); border-color: var(--amber-primary-dark); }
.amber-step.completed .amber-step-number { background: var(--amber-primary-dark); color: #fff; border-color: var(--amber-primary-dark); }
.amber-step-label { font-size: 14px; color: var(--amber-text-light); }
.amber-step.active .amber-step-label { color: var(--amber-primary-dark); font-weight: 600; }

/* Panels */
.amber-panel { background: #fff; border: 1px solid var(--amber-border); border-radius: 8px; padding: 25px; margin-bottom: 20px; }
.amber-panel-title { margin: 0 0 20px; font-size: 20px; color: var(--amber-primary-dark); }

/* Form Elements */
.amber-form-group { margin-bottom: 20px; }
.amber-form-group label, .amber-form-group .amber-group-label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--amber-text); }
.amber-form-group label .required { color: var(--amber-error); }
.amber-input { box-sizing: border-box; width: 100%; padding: 12px 15px; border: 1px solid var(--amber-border); border-radius: 6px; font-size: 16px; transition: border-color 0.2s, box-shadow 0.2s; }
.amber-input:focus { outline: none; border-color: var(--amber-primary); box-shadow: 0 0 0 3px rgba(0, 140, 168, 0.1); }
.amber-input.error { border-color: var(--amber-error); }
.amber-error-message { color: var(--amber-error); font-size: 13px; margin-top: 5px; }

/* Route Cards */
.amber-routes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-bottom: 20px; }
.amber-route-card { border: 2px solid var(--amber-border); border-radius: 8px; padding: 20px; cursor: pointer; transition: all 0.2s; }
.amber-route-card:hover { border-color: var(--amber-secondary); }
.amber-route-card.selected { border-color: var(--amber-primary); background: rgba(0, 140, 168, 0.05); }
.amber-route-card-title { font-size: 18px; font-weight: 600; margin: 0 0 10px; color: var(--amber-primary-dark); }
.amber-route-card-meta { display: flex; gap: 15px; margin-bottom: 10px; font-size: 14px; color: var(--amber-text-light); }
.amber-route-card-meta span { display: flex; align-items: center; gap: 5px; }
.amber-route-card-desc { font-size: 14px; color: var(--amber-text-light); margin: 0; }
.amber-route-card-price { font-size: 18px; font-weight: 700; color: var(--amber-primary-dark); margin-top: 15px; }

/* Equipment Selection */
.amber-equipment-grid { display: grid; gap: 15px; }
.amber-equipment-item { display: flex; align-items: center; gap: 15px; padding: 15px; border: 1px solid var(--amber-border); border-radius: 6px; }
.amber-equipment-info { flex: 1; }
.amber-equipment-available { font-size: 0.85em; color: var(--amber-muted, #666); margin-top: 4px; }
.amber-equipment-soldout { opacity: 0.5; }
.amber-equipment-name { font-weight: 600; margin-bottom: 5px; }
.amber-equipment-capacity { font-size: 13px; color: var(--amber-text-light); }
.amber-equipment-price { font-weight: 600; color: var(--amber-primary-dark); }
.amber-equipment-qty,
.amber-addon-qty { display: flex; align-items: center; gap: 10px; }
.amber-qty-btn,
.amber-addon-qty-btn { width: 36px; height: 36px; border: 1px solid var(--amber-border); background: var(--amber-light); border-radius: 4px; cursor: pointer; font-size: 18px; }
.amber-qty-btn:hover,
.amber-addon-qty-btn:hover { background: var(--amber-primary-dark); color: #fff; border-color: var(--amber-primary); }
.amber-qty-value,
.amber-addon-qty-value { width: 50px; text-align: center; font-weight: 600; font-size: 16px; }

/* Addons */
.amber-addons-grid { display: grid; gap: 10px; }
.amber-addon-item { display: flex; align-items: center; gap: 15px; padding: 12px 15px; border: 1px solid var(--amber-border); border-radius: 6px; }
.amber-addon-item.selected { border-color: var(--amber-primary); background: rgba(0, 140, 168, 0.05); }
.amber-addon-checkbox { width: 20px; height: 20px; cursor: pointer; flex-shrink: 0; }
.amber-addon-info { flex: 1; }
.amber-addon-name { font-weight: 600; }
.amber-addon-desc { font-size: 13px; color: var(--amber-text-light); }
.amber-addon-hint { font-size: 0.85em; color: #666; margin-top: 4px; }
.amber-addon-price { font-weight: 600; color: var(--amber-primary-dark); }

/* Date & Time */
.amber-datetime-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .amber-datetime-row { grid-template-columns: 1fr; } }
.amber-time-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; margin-top: 10px; }
.amber-time-slot { padding: 10px; text-align: center; border: 1px solid var(--amber-border); border-radius: 4px; cursor: pointer; font-weight: 500; }
.amber-time-slot:hover { border-color: var(--amber-primary); }
.amber-time-slot.selected { background: var(--amber-primary-dark); color: #fff; border-color: var(--amber-primary); }
.amber-time-slot.disabled { opacity: 0.5; cursor: not-allowed; }

.amber-calendar { border: 1px solid var(--amber-border); border-radius: 6px; padding: 12px; }
.amber-calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.amber-calendar-title { font-weight: 600; }
.amber-calendar-nav { background: none; border: 1px solid var(--amber-border); border-radius: 4px; cursor: pointer; width: 32px; height: 32px; font-size: 18px; line-height: 1; }
.amber-calendar-nav.is-disabled { opacity: 0.35; cursor: not-allowed; }
.amber-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.amber-calendar-weekday { text-align: center; font-size: 0.75em; color: var(--amber-muted, #666); padding: 4px 0; }
.amber-calendar-day { text-align: center; padding: 8px 0; border-radius: 4px; border: 1px solid transparent; }
.amber-calendar-day.is-empty { border: none; }
.amber-calendar-day.is-disabled { color: var(--amber-muted, #999); opacity: 0.4; cursor: not-allowed; }
.amber-calendar-day.is-open { cursor: pointer; border-color: var(--amber-border); }
.amber-calendar-day.is-open:hover { border-color: var(--amber-primary); }
.amber-calendar-day.is-selected { background: var(--amber-primary-dark); color: #fff; border-color: var(--amber-primary); }
.amber-calendar-empty { text-align: center; font-size: 0.85em; color: var(--amber-muted, #666); margin: 8px 0 0; }

/* Summary — itemized breakdown table (commit 1: rozbicie ceny) */
.amber-summary { background: var(--amber-light); border-radius: 8px; padding: 20px; }
.amber-summary-title { font-size: 18px; font-weight: 600; margin: 0 0 15px; }
.amber-summary-table { width: 100%; border-collapse: collapse; }
.amber-summary-row td { padding: 8px 0; border-bottom: 1px solid var(--amber-border); }
.amber-summary-row:last-child td { border-bottom: none; }
.amber-summary-row .amber-summary-label { text-align: left; }
.amber-summary-row .amber-summary-qty { text-align: center; width: 50px; color: var(--amber-text-light); font-size: 14px; }
.amber-summary-row .amber-summary-unit { text-align: right; width: 100px; white-space: nowrap; color: var(--amber-text-light); font-size: 14px; }
.amber-summary-row .amber-summary-line { text-align: right; width: 100px; white-space: nowrap; font-weight: 600; }
.amber-summary-row.total td { font-size: 20px; font-weight: 700; color: var(--amber-primary-dark); padding-top: 15px; border-top: 2px solid var(--amber-primary); border-bottom: none; }
.amber-summary-row.total .amber-summary-line { color: var(--amber-primary-dark); }

/* Buttons */
.amber-btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border: none; border-radius: 6px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.amber-btn-primary { background: var(--amber-primary-dark); color: #fff; }
.amber-btn-primary:hover { background: #005266; }
.amber-btn-secondary { background: var(--amber-light); color: var(--amber-text); border: 1px solid var(--amber-border); }
.amber-btn-secondary:hover { background: #e9ecef; }
.amber-btn-lg { padding: 16px 40px; font-size: 18px; }
.amber-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.amber-btn-group { display: flex; gap: 15px; margin-top: 25px; }

/* Messages */
.amber-alert { padding: 15px 20px; border-radius: 6px; margin-bottom: 20px; }
.amber-alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.amber-alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.amber-alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.amber-alert-info { background: #cce5ff; color: #004085; border: 1px solid #b8daff; }
.amber-alert-closed { background: #e0f4f8; color: #006d83; border: 1px solid #b3e0ea; }

/* Loading */
.amber-loading { text-align: center; padding: 40px; }
.amber-spinner { width: 40px; height: 40px; border: 3px solid var(--amber-light); border-top-color: var(--amber-primary); border-radius: 50%; animation: amber-spin 1s linear infinite; margin: 0 auto 15px; }
@keyframes amber-spin { to { transform: rotate(360deg); } }

/* Success Page */
.amber-success-icon { width: 80px; height: 80px; background: var(--amber-success); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.amber-success-icon svg { width: 40px; height: 40px; fill: #fff; }
.amber-booking-details { background: var(--amber-light); border-radius: 8px; padding: 25px; margin: 20px 0; }
.amber-booking-details h3 { margin: 0 0 15px; font-size: 18px; }
.amber-detail-row { display: flex; padding: 10px 0; border-bottom: 1px solid var(--amber-border); }
.amber-detail-row:last-child { border-bottom: none; }
.amber-detail-label { flex: 0 0 150px; font-weight: 600; color: var(--amber-text-light); }
.amber-detail-value { flex: 1; }

/* Responsive */
@media (max-width: 600px) {
    .amber-steps { flex-wrap: wrap; }
    .amber-step { flex: 0 0 50%; }
    .amber-routes-grid { grid-template-columns: 1fr; }
    .amber-btn-group { flex-direction: column; }
    .amber-btn-group .amber-btn { width: 100%; }
}

.amber-discount-code-row {
	display: flex;
	gap: 10px;
	align-items: stretch;
}

.amber-discount-code-input {
	flex: 1;
	min-width: 0;
}

@media (max-width: 480px) {
	.amber-discount-code-row {
		flex-direction: column;
	}

	.amber-discount-code-row .amber-btn {
		width: 100%;
	}
}

@media (max-width: 600px) {
	.amber-panel {
		padding: 16px;
	}

	.amber-equipment-item {
		gap: 10px;
		padding: 12px;
		min-width: 0;
	}

	/* Narrow screens: let the addon row wrap so the stepper and price
	   drop below the name and description instead of overlapping them. */
	.amber-addon-item {
		gap: 10px;
		padding: 12px;
		min-width: 0;
		flex-wrap: wrap;
		justify-content: space-between;
	}

	.amber-equipment-info {
		min-width: 0;
	}

	.amber-addon-info {
		min-width: 0;
		flex-basis: 100%;
	}

	.amber-equipment-price,
	.amber-addon-price {
		white-space: normal;
		text-align: right;
	}

	.amber-equipment-qty {
		flex-shrink: 0;
	}

	.amber-addon-qty {
		flex-shrink: 0;
	}
}

/* Child seat row (sub-row under a 2-person kayak equipment item) */
.amber-child-seat-row {
    margin-top: -15px;
    padding: 10px 15px 12px;
    border: 1px solid var(--amber-border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    background: var(--amber-light);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.amber-child-seat-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}
.amber-child-seat-toggle {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.amber-child-age-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--amber-text);
}
.amber-child-seat-age {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid var(--amber-border);
    border-radius: 4px;
    font-size: 14px;
}

/* Group services info (catering + group activities — contact phone/email, not bookable online) */
.amber-group-services-info {
    margin-top: 25px;
    padding: 20px;
    background: var(--amber-light);
    border: 1px solid var(--amber-border);
    border-radius: 8px;
}
.amber-group-services-title {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--amber-primary-dark);
}
.amber-group-services-desc {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--amber-text-light);
}
.amber-group-services-list {
    margin: 0 0 12px;
    padding-left: 20px;
}
.amber-group-services-list li {
    margin-bottom: 6px;
    font-size: 14px;
}
.amber-group-services-desc-inline {
    color: var(--amber-text-light);
    margin-left: 6px;
}
.amber-group-services-cta {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}
.amber-group-services-cta a {
    color: var(--amber-primary-dark);
    text-decoration: none;
}
.amber-group-services-cta a:hover {
    text-decoration: underline;
}
