/* ============================================
   Doctor Appointment Page Styles
   ============================================ */

:root {
    --doctor-primary: #0d6efd;
    --doctor-accent: #00bcd4;
    --doctor-success: #28a745;
    --doctor-light: #f8f9fa;
    --doctor-border: #dee2e6;
    --doctor-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --doctor-shadow-hover: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --doctor-transition: all 0.3s ease-in-out;
}

/* ============================================
   Hero Section
   ============================================ */

.doctor-hero-wrapper {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
    margin-bottom: 3rem;
}

.doctor-hero {
    position: relative;
    background: linear-gradient(135deg, var(--doctor-primary) 0%, var(--doctor-accent) 100%);
    padding: 2rem;
    height: 350px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
}

.doctor-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    z-index: 1;
}

.doctor-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.doctor-hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
}

.doctor-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.doctor-hero-content p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0;
    line-height: 1.6;
}

/* ============================================
   Doctor Cards Container - Controls width of both sections
   ============================================ */

.doctor-cards-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ============================================
   Filter Form Styles
   ============================================ */

.filters-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.filters-wrapper .form-label {
    height: 24px;
    min-height: 24px;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    display: block;
}

.filters-wrapper #search,
.filters-wrapper #dateButton {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
}

.form-label {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.5;
    min-height: 1.5rem;
    display: block;
}

.form-control,
.form-select {
    border: 1px solid var(--doctor-border);
    box-shadow: var(--doctor-shadow);
    transition: var(--doctor-transition);
    height: 48px !important;
    padding: 0.5rem 1rem !important;
    font-size: 1rem !important;
    box-sizing: border-box !important;
}

.filters-wrapper .form-control,
.filters-wrapper .form-select {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--doctor-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-group .btn {
    flex: 1;
    min-width: 140px;
}

#resetFiltersBtn {
    min-width: 160px;
    transition: var(--doctor-transition);
}

#resetFiltersBtn:hover {
    background-color: var(--doctor-light);
    border-color: #999;
    transform: translateY(-1px);
}

@media (max-width: 576px) {
    .btn-group .btn {
        min-width: auto;
        font-size: 0.875rem;
    }

    .btn-group .btn i {
        display: none;
    }

    #resetFiltersBtn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* ============================================
   Doctors Grid Container
   ============================================ */

.doctors-grid-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#doctorsGrid {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* CRITICAL: Ensure both cards have exact same width */
main.content-container .card.border-0.shadow-sm {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

main.content-container .card.border-0.shadow-sm .card-body {
    padding: 1.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

/* CRITICAL: Fix all rows inside card bodies to prevent overflow */
main.content-container .card.border-0.shadow-sm .card-body .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

main.content-container .card.border-0.shadow-sm .card-body .row > * {
    padding-left: calc(var(--bs-gutter-x) * 0.5) !important;
    padding-right: calc(var(--bs-gutter-x) * 0.5) !important;
}

main.content-container #doctorsContainer {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
}

main.content-container #doctorsGrid {
    width: 100% !important;
    max-width: 100% !important;
}

@media (min-width: 768px) {
    main.content-container .card.border-0.shadow-sm .card-body {
        padding: 2rem !important;
    }
}

.doctor-card {
    border-radius: 12px;
    overflow: hidden;
    transition: var(--doctor-transition);
    position: relative;
}

.doctor-card:hover {
    box-shadow: var(--doctor-shadow-hover) !important;
    transform: translateY(-4px);
}

.doctor-card .card-header {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(0, 188, 212, 0.1) 100%);
    padding: 1rem !important;
    border-bottom: 1px solid var(--doctor-border);
}

.doctor-specialty-badge {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--doctor-primary), var(--doctor-accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.doctor-card .card-title {
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.5rem !important;
    line-height: 1.3;
}

.doctor-card .card-body {
    padding: 1rem;
}

.doctor-card .card-body h6 {
    font-size: 0.95rem;
}

.doctor-card .card-footer {
    padding: 1rem !important;
    border-top: 1px solid var(--doctor-border);
}

.doctor-card .card-footer .btn {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

/* Icon Styling */
.doctor-card .bi {
    font-size: 0.9rem;
    vertical-align: baseline;
}

.doctor-card .bi-stethoscope {
    color: var(--doctor-primary);
}

.doctor-card .bi-person-fill {
    color: var(--doctor-primary);
}

.doctor-card .bi-calendar-check {
    color: var(--doctor-success);
}

.doctor-card .bi-clock {
    color: var(--doctor-accent);
}

/* Info Text */
.doctor-card .text-muted {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999 !important;
}

.doctor-card .fw-medium {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    font-weight: 500;
    border-radius: 6px;
}

.bg-success-subtle {
    background-color: rgba(40, 167, 69, 0.15) !important;
}

.text-success {
    color: var(--doctor-success) !important;
}

.bg-secondary-subtle {
    background-color: rgba(108, 117, 125, 0.15) !important;
}

.text-secondary {
    color: #6c757d !important;
}

/* ============================================
   Button Styles
   ============================================ */

.btn-primary {
    background: linear-gradient(135deg, var(--doctor-primary), var(--doctor-accent));
    border: none;
    transition: var(--doctor-transition);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0b5ed7, #00a3c5);
    box-shadow: var(--doctor-shadow-hover);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--doctor-primary);
    border-color: var(--doctor-primary);
}

.btn-outline-primary:hover {
    background-color: var(--doctor-primary);
    border-color: var(--doctor-primary);
    color: white;
}

.btn-outline-secondary {
    border-color: var(--doctor-border);
    color: #666;
}

.btn-outline-secondary:hover {
    background-color: var(--doctor-light);
    border-color: #999;
}

/* ============================================
   Grid & Layout Adjustments
   ============================================ */

/* Adaptive padding for doctor-hero-wrapper */
@media (min-width: 576px) {
    .doctor-hero-wrapper {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

@media (min-width: 768px) {
    .doctor-hero-wrapper {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

@media (min-width: 992px) {
    .doctor-hero-wrapper {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

@media (min-width: 1200px) {
    .doctor-hero-wrapper {
        max-width: 1320px;
        padding-left: 5rem;
        padding-right: 5rem;
    }
}

@media (min-width: 1400px) {
    .doctor-hero-wrapper {
        max-width: 1400px;
        padding-left: 6rem;
        padding-right: 6rem;
    }
}

@media (min-width: 1600px) {
    .doctor-hero-wrapper {
        max-width: 1500px;
        padding-left: 7rem;
        padding-right: 7rem;
    }
}

@media (max-width: 992px) {
    .doctor-hero {
        height: 300px;
        border-radius: 6px;
    }

    .doctor-hero-content h1 {
        font-size: 2rem;
    }

    .doctor-hero-content p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .doctor-hero {
        padding: 1.5rem;
        height: 280px;
    }

    .doctor-hero-content h1 {
        font-size: 1.75rem;
    }

    .doctor-hero-content p {
        font-size: 0.95rem;
    }

    .card-body {
        padding: 1rem !important;
    }

    .card-header {
        padding: 1rem !important;
    }

    .doctor-specialty-badge {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .doctor-hero {
        height: 250px;
        padding: 1rem;
    }

    .doctor-hero-content h1 {
        font-size: 1.5rem;
    }

    .doctor-hero-content p {
        font-size: 0.9rem;
    }
}

/* ============================================
   Empty State Styles
   ============================================ */

.alert {
    border-radius: 12px;
    padding: 2rem;
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.1);
    border-color: rgba(23, 162, 184, 0.3);
}

.alert-light {
    background-color: var(--doctor-light);
    border-color: var(--doctor-border);
}

.alert-heading {
    color: #333;
    font-weight: 600;
}

.alert ul li {
    padding: 0.5rem 0;
    line-height: 1.6;
}

.alert a {
    color: var(--doctor-primary);
    text-decoration: none;
    font-weight: 600;
}

.alert a:hover {
    text-decoration: underline;
}

/* ============================================
   Results Header
   ============================================ */

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--doctor-light);
}

.results-header h2 {
    margin: 0;
    color: #333;
}

.results-header .badge {
    background-color: var(--doctor-accent);
    color: white;
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
}

@media (max-width: 576px) {
    .cta-section {
        padding: 2rem 1rem;
    }

    .cta-section h3 {
        font-size: 1.75rem !important;
    }

    .cta-section .btn {
        width: 100%;
    }
}

/* ============================================
   Transitions & Effects
   ============================================ */

.transition-shadow {
    transition: box-shadow var(--doctor-transition);
}

.transition-shadow:hover {
    box-shadow: var(--doctor-shadow-hover) !important;
}

/* ============================================
   Responsive Typography
   ============================================ */

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .display-6 {
        font-size: 1.5rem;
    }

    .lead {
        font-size: 0.95rem;
    }

    .card-title {
        font-size: 1rem !important;
    }
}

/* ============================================
   Utility Classes
   ============================================ */

/* Override global content-container for Doctor page */
main.content-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box !important;
}

@media (min-width: 768px) {
    main.content-container {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

@media (min-width: 992px) {
    main.content-container {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
}

.fw-semibold {
    font-weight: 600;
}

.text-muted-custom {
    color: #6c757d;
    font-size: 0.9rem;
}

/* ============================================
   Focus States for Accessibility
   ============================================ */

.btn:focus,
.form-control:focus,
.form-select:focus,
a:focus {
    outline: 2px solid var(--doctor-primary);
    outline-offset: 2px;
}

/* ============================================
   Calendar Styles
   ============================================ */

.date-picker-wrapper {
    position: relative;
    height: 48px !important;
    display: block !important;
}

.calendar-dropdown {
    min-width: 320px;
    max-width: 400px;
    background: white;
    border: 1px solid var(--doctor-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    animation: slideDown 0.2s ease-out;
}

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

.calendar-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: #999;
    font-size: 0.75rem;
    padding: 0.5rem 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.calendar-date-btn {
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid transparent;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-date-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: var(--doctor-primary);
}

.calendar-date-btn.other-month {
    color: #ccc;
    background: transparent;
    cursor: default;
}

.calendar-date-btn.other-month:hover {
    background: transparent;
    border-color: transparent;
}

.calendar-date-btn.weekend {
    color: #ddd;
    background: #fafafa;
    cursor: not-allowed;
}

.calendar-date-btn.weekend:hover {
    background: #fafafa;
    border-color: transparent;
}

.calendar-date-btn.today {
    background: linear-gradient(135deg, var(--doctor-primary), var(--doctor-accent));
    color: white;
    border-color: var(--doctor-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
}

.calendar-date-btn.today:hover {
    background: linear-gradient(135deg, #0b5ed7, #00a3c5);
    border-color: #0b5ed7;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.calendar-date-btn.selected {
    background: linear-gradient(135deg, var(--doctor-primary), var(--doctor-accent));
    color: white;
    border-color: var(--doctor-primary);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.calendar-date-btn.selected:hover {
    background: linear-gradient(135deg, #0b5ed7, #00a3c5);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.4);
}

.calendar-date-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.calendar-date-btn:focus {
    outline: none;
}

/* ============================================
   Date Button Styles
   ============================================ */

#dateButton {
    padding: 0.5rem 1rem !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    border-color: var(--doctor-border);
    color: #666;
    font-weight: 500;
    transition: var(--doctor-transition);
    background-color: white;
    font-size: 1rem !important;
    box-sizing: border-box !important;
    line-height: 1.5 !important;
}

#dateButton:hover {
    border-color: var(--doctor-primary);
    color: #333;
    background-color: #f8f9ff;
}

#dateButton:active,
#dateButton:focus {
    border-color: var(--doctor-primary);
    background-color: white;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    color: #333;
}

#dateText {
    display: inline-block;
}

/* Responsive для мобильных */
@media (max-width: 576px) {
    .calendar-dropdown {
        min-width: 280px;
        right: 0;
        left: auto;
    }

    .calendar-date-btn {
        font-size: 0.85rem;
    }

    .calendar-day-header {
        font-size: 0.7rem;
    }
}

/* Имитация Tailwind container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.doctor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
}

@media (max-width: 992px) {
    .doctor-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .doctor-grid {
        grid-template-columns: 1fr;
    }
}

.doctor-grid-item {
    min-width: 0;
}


.doctor-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: 0.3s;
    background: #fff;
}

    .doctor-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transform: translateY(-4px);
    }

.doctor-card-header {
    padding: 1rem;
    border-bottom: 1px solid #f1f1f1;
    background: linear-gradient(135deg, rgba(13,110,253,0.05), rgba(0,188,212,0.05));
}







