/**
 * Stylesheet for HunteCare frontend booking form
 */

:root {
    --huntecare-primary: #0072ff;
    --huntecare-primary-glow: rgba(0, 114, 255, 0.15);
    --huntecare-success: #00d28a;
    --huntecare-error: #ff4757;
    --huntecare-bg: rgba(255, 255, 255, 0.7);
    --huntecare-border: rgba(255, 255, 255, 0.4);
    --huntecare-text: #2f3542;
    --huntecare-text-light: #747d8c;
    --huntecare-card-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.huntecare-booking-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 650px;
    margin: 2rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.huntecare-booking-wrapper * {
    box-sizing: border-box;
}

.huntecare-glass-card {
    background: var(--huntecare-bg);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border: 1px solid var(--huntecare-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--huntecare-card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.huntecare-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.huntecare-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--huntecare-text);
    margin: 0 0 0.5rem 0;
}

.huntecare-header p {
    font-size: 0.95rem;
    color: var(--huntecare-text-light);
    margin: 0;
}

/* Progress bar */
.huntecare-progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 3rem;
}

.huntecare-progress-bar::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 5%;
    right: 5%;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
}

.huntecare-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    width: 30%;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--huntecare-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
    border: 2px solid #fff;
}

.step-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--huntecare-text-light);
    text-align: center;
    transition: color 0.3s;
}

.huntecare-step.active .step-num {
    background: var(--huntecare-primary);
    color: #fff;
    box-shadow: 0 0 0 4px var(--huntecare-primary-glow);
}

.huntecare-step.active .step-label {
    color: var(--huntecare-primary);
    font-weight: 600;
}

.huntecare-step.completed .step-num {
    background: var(--huntecare-success);
    color: #fff;
}

.huntecare-step.completed .step-label {
    color: var(--huntecare-success);
}

/* Form Steps */
.huntecare-form-step {
    display: none;
}

.huntecare-form-step.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

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

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--huntecare-text);
    margin-bottom: 0.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

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

.form-row .form-group.flex-2 {
    flex: 2;
}

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

/* Form Controls */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid #dcdde1;
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--huntecare-text);
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
    border-color: var(--huntecare-primary);
    box-shadow: 0 0 0 3px var(--huntecare-primary-glow);
}

/* Transport Type Cards */
.transit-type-selector {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.type-card {
    flex: 1;
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    background: #fff;
    transition: all 0.25s ease;
}

.type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.type-card .icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.type-card .title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--huntecare-text);
    margin-bottom: 0.25rem;
}

.type-card .desc {
    font-size: 0.8rem;
    color: var(--huntecare-text-light);
}

.type-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.type-card:has(input[type="radio"]:checked) {
    border-color: var(--huntecare-primary);
    background: rgba(0, 114, 255, 0.03);
    box-shadow: 0 4px 15px var(--huntecare-primary-glow);
}

.type-card:has(input[type="radio"]:checked) .title {
    color: var(--huntecare-primary);
}

/* Validation Errors */
.error-msg {
    color: var(--huntecare-error);
    font-size: 0.8rem;
    margin-top: 0.3rem;
    display: none;
}

.input-error {
    border-color: var(--huntecare-error) !important;
}

/* Booking Types Selection */
.huntecare-booking-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.booking-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    background: #fff;
    border: 1.5px solid #dcdde1;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.25s ease;
}

.booking-type-card:hover {
    border-color: #b0c4de;
    transform: translateY(-2px);
}

.booking-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.booking-type-card .type-icon {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

.booking-type-card .type-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--huntecare-text);
}

.booking-type-card.active,
.booking-type-card:has(input[type="radio"]:checked) {
    border-color: var(--huntecare-primary);
    background: rgba(0, 114, 255, 0.05);
    box-shadow: 0 0 0 1px var(--huntecare-primary);
}

.booking-type-card.active .type-title,
.booking-type-card:has(input[type="radio"]:checked) .type-title {
    color: var(--huntecare-primary);
}

@media (max-width: 500px) {
    .huntecare-booking-types {
        grid-template-columns: 1fr;
    }
    .booking-type-card {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    .booking-type-card .type-icon {
        margin-bottom: 0;
    }
}

/* Conditional Box */
.huntecare-conditional-box {
    background: rgba(255, 255, 255, 0.6);
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    animation: fadeIn 0.3s ease-out;
}

.section-sublabel {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--huntecare-text);
    margin-bottom: 0.6rem;
}

/* Weekday Pills */
.weekdays-pills-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.weekday-pill {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.weekday-pill input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.weekday-label {
    display: inline-block;
    padding: 0.45rem 0.75rem;
    background: #f1f2f6;
    color: var(--huntecare-text);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.weekday-pill:hover .weekday-label {
    background: #e4e7eb;
}

.weekday-pill.selected .weekday-label,
.weekday-pill input[type="checkbox"]:checked ~ .weekday-label {
    background: var(--huntecare-primary);
    color: #fff;
    box-shadow: 0 2px 8px var(--huntecare-primary-glow);
}

/* Custom Fields */
.huntecare-custom-fields-section {
    border-top: 1px dashed #dcdde1;
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.huntecare-custom-fields-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--huntecare-text);
}

/* Custom Checkbox Design */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--huntecare-text);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-checkmark {
    position: absolute;
    top: 1px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1.5px solid #dcdde1;
    border-radius: 6px;
    transition: background-color 0.2s, border-color 0.2s;
}

.checkbox-container:hover input ~ .checkbox-checkmark {
    border-color: var(--huntecare-primary);
}

.checkbox-container input:checked ~ .checkbox-checkmark {
    background-color: var(--huntecare-primary);
    border-color: var(--huntecare-primary);
}

.checkbox-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkbox-checkmark:after {
    display: block;
}

.checkbox-container .checkbox-checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    padding-left: 0.5rem;
    line-height: 1.4;
}

/* Action Buttons */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    border: none;
    border-radius: 10px;
    padding: 0.85rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-next, .btn-submit {
    background: var(--huntecare-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 114, 255, 0.25);
}

.btn-next:hover, .btn-submit:hover {
    background: #0062db;
    box-shadow: 0 4px 20px rgba(0, 114, 255, 0.4);
    transform: translateY(-1px);
}

.btn-prev {
    background: #f1f2f6;
    color: var(--huntecare-text-light);
}

.btn-prev:hover {
    background: #e4e7eb;
    color: var(--huntecare-text);
}

/* Loading Spinner */
.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    margin-left: 10px;
    display: none;
    animation: spin 0.8s linear infinite;
}

.btn.loading .btn-spinner {
    display: inline-block;
}

.btn.loading .btn-text {
    opacity: 0.8;
}

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

/* Result Screen */
.huntecare-result-screen {
    display: none;
    text-align: center;
    padding: 1rem 0;
}

.huntecare-result-screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.result-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 210, 138, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.checkmark-svg {
    width: 48px;
    height: 48px;
    stroke: var(--huntecare-success);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.checkmark-circle {
    stroke: var(--huntecare-success);
    stroke-width: 2;
    stroke-miterlimit: 10;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

.huntecare-result-screen h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--huntecare-text);
    margin: 0 0 0.75rem 0;
}

.huntecare-result-screen p {
    font-size: 0.95rem;
    color: var(--huntecare-text-light);
    max-width: 400px;
    margin: 0 auto 2rem auto;
    line-height: 1.5;
}

.btn-reset {
    background: #f1f2f6;
    color: var(--huntecare-text-light);
}

.btn-reset:hover {
    background: #e4e7eb;
    color: var(--huntecare-text);
}
