/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    background-color: #f3f4f6;
    color: #111827;
}

/* Navbar */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0ea5e9;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-logo a:hover {
    color: #0284c7;
}

.nav-links a {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.nav-links a:hover {
    background: #f3f4f6;
    color: #0ea5e9;
}

/* Main Container */
.consultation-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 1rem 2rem;
}

.form-wrapper {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Emergency Notice */
.emergency-notice {
    background: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.emergency-notice svg {
    flex-shrink: 0;
}

/* Progress Bar */
.progress-bar {
    padding: 2rem 1.5rem;
    position: relative;
}

.progress {
    position: absolute;
    top: 50%;
    left: 2rem;
    right: 2rem;
    height: 2px;
    background: #e5e7eb;
    transform: translateY(-50%);
}

.progress::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #0ea5e9;
    transition: width 0.3s ease;
}

.steps {
    position: relative;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
}

.step {
    width: 2rem;
    height: 2rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
}

.step.active {
    border-color: #0ea5e9;
    color: #0ea5e9;
}

.step.complete {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: white;
}

/* Form Styles */
.consultation-form {
    padding: 2rem;
}

.form-step {
    animation: fadeIn 0.3s ease;
}

.form-step.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h2 {
    font-size: 1.5rem;
    color: #111827;
    margin-bottom: 0.5rem;
}

.step-description {
    color: #6b7280;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Button Styles */
.button-group {
    display: flex;
    gap: 1rem;
}

.next-button,
.back-button,
.submit-button,
.close-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.next-button,
.submit-button {
    background: #0ea5e9;
    color: white;
}

.next-button:hover,
.submit-button:hover {
    background: #0284c7;
}

.back-button {
    background: #f3f4f6;
    color: #374151;
}

.back-button:hover {
    background: #e5e7eb;
}

/* Vet List */
.vet-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.vet-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.vet-card:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
}

.vet-card.selected {
    border-color: #0ea5e9;
    background: #f0f9ff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.vet-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.vet-credentials {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.vet-clinic {
    color: #374151;
    margin-bottom: 0.5rem;
}

.consultation-fee {
    color: #0ea5e9;
    font-weight: 600;
}

/* Consultation History Section */
#consultation-history {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
}

.history-list {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.history-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.2s;
}

.history-item:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.history-item h3 {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.history-item p {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-scheduled {
    background: #f0f9ff;
    color: #0ea5e9;
}

.status-completed {
    background: #f0fdf4;
    color: #16a34a;
}

.status-cancelled {
    background: #fef2f2;
    color: #dc2626;
}

.cancel-btn {
    background: #fee2e2;
    color: #991b1b;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.cancel-btn:hover {
    background: #fecaca;
}

.back-to-form {
    background: #0ea5e9;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin-top: 1rem;
}

.back-to-form:hover {
    background: #0284c7;
}

.empty-history {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.empty-history i {
    font-size: 3rem;
    color: #e5e7eb;
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}

/* Success Animation */
.success-animation {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.success-animation.hidden {
    display: none;
}

.success-content {
    text-align: center;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.checkmark-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #0ea5e9;
    margin: 0 auto 1.5rem;
    position: relative;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.checkmark {
    width: 40px;
    height: 20px;
    border: 4px solid white;
    border-top: none;
    border-right: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%) rotate(-45deg);
    animation: checkmark 0.3s ease-out 0.3s forwards;
    opacity: 0;
}

@keyframes checkmark {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) rotate(-45deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -60%) rotate(-45deg) scale(1);
    }
}

/* Pet Animation */
.pet-animation {
    margin: 2rem auto;
    width: 120px;
    height: 80px;
    position: relative;
}

.pet-head {
    width: 40px;
    height: 40px;
    background: #0ea5e9;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 20px;
    animation: headBob 1s infinite;
}

.pet-body {
    width: 80px;
    height: 40px;
    background: #0ea5e9;
    border-radius: 20px;
    position: absolute;
    bottom: 0;
    left: 0;
}

.pet-tail {
    width: 40px;
    height: 10px;
    background: #0ea5e9;
    border-radius: 5px;
    position: absolute;
    bottom: 15px;
    right: -20px;
    transform-origin: left center;
    animation: tailWag 0.5s infinite;
}

@keyframes headBob {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes tailWag {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(20deg);
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .consultation-form {
        padding: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .vet-list {
        grid-template-columns: 1fr;
    }
    
    .history-list {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .progress::before,
    .step,
    .form-step,
    .success-animation,
    .checkmark-circle,
    .checkmark,
    .pet-head,
    .pet-tail {
        transition: none;
        animation: none;
    }
}

:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}