/* Modern Booking Form Styles */

body .booking-container {
    max-width: 1000px !important;
    margin: 0 auto !important;
    padding: 2rem 2rem 2rem 2rem !important;
    box-sizing: border-box;
}

/* Specific padding for customer dashboard booking page */
body:not(.homepage) .booking-container {
    padding-top: 2rem !important;
}

@media (max-width: 768px) {
    .booking-container {
        padding: 6rem 1rem 2rem 1rem !important;
    }
}

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

.booking-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1a2332;
    margin-bottom: 0.5rem;
}

.booking-header .subtitle {
    color: #6c757d;
    font-size: 1.1rem;
}

.signup-alert {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    position: relative;
}

.signup-alert .alert-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.alert-close:hover {
    color: #1a2332;
}

.signup-alert strong {
    color: #1a2332;
}

.signup-alert .alert-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-link {
    color: #20b2aa;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.btn-link:hover {
    color: #1a9b94;
    text-decoration: underline;
}

.btn-outline {
    background: transparent;
    border: 1px solid #20b2aa;
    color: #20b2aa;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: #20b2aa;
    color: #fff;
}

.booking-form {
    background: #fff !important;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    box-sizing: border-box;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a2332;
    margin-bottom: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1a2332;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #20b2aa;
    box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.1);
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.pet-input-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.multi-select {
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.date-input-wrapper {
    position: relative;
    max-width: 300px;
    cursor: pointer;
    width: 100%;
}

.date-input-wrapper .date-input {
    max-width: 300px;
    cursor: pointer;
    width: 100%;
    pointer-events: none;
}

.date-input-wrapper:hover {
    opacity: 0.8;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s;
}

.service-card:hover {
    border-color: #20b2aa;
    box-shadow: 0 2px 8px rgba(32, 178, 170, 0.1);
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.service-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a2332;
    margin: 0;
}

.service-duration {
    font-size: 0.875rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.variant-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #1a2332;
    font-size: 0.95rem;
}

.variant-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.variant-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.variant-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1rem;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-height: 100px;
}

.variant-card:hover {
    border-color: #20b2aa;
    background: #f0fdfa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 178, 170, 0.15);
}

.variant-card.selected {
    border-color: #20b2aa;
    background: #e0f7f5;
    box-shadow: 0 4px 12px rgba(32, 178, 170, 0.2);
}

.variant-card.selected .variant-name {
    font-weight: 600;
    color: #20b2aa;
}

.variant-card.selected .variant-price {
    color: #1a9b94;
}

.variant-name {
    flex: 1;
    color: #1a2332;
}

.variant-price {
    font-weight: 600;
    color: #20b2aa;
}

.time-slot-group {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.time-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
}

.summary-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.booking-summary {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.summary-placeholder {
    color: #6c757d;
    text-align: center;
    padding: 2rem;
}

.booking-summary > div {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.booking-summary table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    min-width: 600px; /* Ensure table doesn't get too compressed */
}

.booking-summary th,
.booking-summary td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.booking-summary th {
    white-space: nowrap;
}

.booking-summary td {
    word-wrap: break-word;
    max-width: 150px;
}

.booking-summary td:first-child {
    max-width: 120px;
}

.booking-summary td:nth-child(2) {
    max-width: 120px;
}

.booking-summary td:nth-child(3) {
    max-width: 100px;
}


.booking-summary .total-row {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1a2332;
}

/* Mobile-friendly summary cards */
.booking-summary-mobile {
    display: none;
}

.booking-summary-mobile .summary-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.booking-summary-mobile .summary-item-header {
    font-weight: 600;
    color: #1a2332;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.booking-summary-mobile .summary-item-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.booking-summary-mobile .summary-item-details strong {
    color: #1a2332;
}

.form-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.btn-primary {
    background: #20b2aa;
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 200px;
}

.btn-primary:hover:not(:disabled) {
    background: #1a9b94;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(32, 178, 170, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loader {
    display: inline-block;
}

/* Responsive */
/* Pet Selection Cards */
.pets-grid-select {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.pet-select-card {
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.pet-select-card:hover {
    border-color: #20b2aa;
    background: #f0fdfa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 178, 170, 0.15);
}

.pet-select-card.selected {
    border-color: #20b2aa;
    background: #e0f7f5;
    box-shadow: 0 4px 12px rgba(32, 178, 170, 0.2);
}

.pet-select-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pet-select-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pet-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.pet-select-name {
    font-weight: 500;
    color: #1a2332;
    font-size: 0.9rem;
}

.pet-select-card.selected .pet-select-name {
    color: #20b2aa;
    font-weight: 600;
}

.pet-select-checkmark {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    background: #20b2aa;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    animation: checkmarkAppear 0.2s ease;
}

.pet-select-card.selected .pet-select-checkmark {
    display: flex;
}

@keyframes checkmarkAppear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pet-select-checkmark svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .booking-container {
        padding: 6rem 1rem 2rem 1rem !important;
    }
    
    .booking-header h1 {
        font-size: 2rem;
    }
    
    .booking-form {
        padding: 1.5rem !important;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .pet-input-group {
        grid-template-columns: 1fr;
    }
    
    .pets-grid-select {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .pet-select-image {
        width: 60px;
        height: 60px;
    }
    
    .pet-select-checkmark {
        width: 24px;
        height: 24px;
        top: 2px;
        right: 2px;
    }
    
    .pet-select-checkmark svg {
        width: 14px;
        height: 14px;
    }
    
    .booking-summary {
        padding: 1rem;
    }
    
    .booking-summary > div {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .booking-summary table {
        font-size: 0.85rem;
        min-width: 500px;
    }
    
    .booking-summary th,
    .booking-summary td {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
    }
    
    .booking-summary .mt-3 {
        margin-top: 1rem;
        font-size: 0.9rem;
    }
    
    .booking-summary .mt-3 p {
        margin-bottom: 0.5rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .summary-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .booking-container {
        padding: 6rem 1rem 2rem 1rem !important;
    }
    
    .booking-form {
        padding: 1rem !important;
        border-radius: 8px;
    }
    
    .booking-header h1 {
        font-size: 1.75rem;
    }
    
    .booking-summary {
        padding: 0.75rem;
    }
    
    .booking-summary > div {
        margin: 0 -0.75rem;
        padding: 0 0.75rem;
    }
    
    .booking-summary table {
        min-width: 450px;
        font-size: 0.8rem;
    }
    
    .booking-summary th,
    .booking-summary td {
        padding: 0.4rem 0.3rem;
        font-size: 0.75rem;
    }
    
    .booking-summary .mt-3 {
        font-size: 0.85rem;
    }
    
    .form-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
}

