/* Responsive Design */

/* Large Desktop */
@media (max-width: 1440px) {
    .main-container {
        padding: 25px;
    }
    
    .header-container {
        padding: 18px 25px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .booking-wrapper {
        gap: 30px;
    }
    
    .calendar-card,
    .time-card {
        padding: 25px;
    }
    
    .main-container {
        padding: 20px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .booking-wrapper {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 700px;
        margin: 0 auto;
    }
    
    .header-container {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }
    
    .header-actions {
        gap: 20px;
    }
    
    .time-slots {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .time-slots-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .main-container {
        padding: 15px;
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .booking-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header {
        padding: 15px 0;
    }
    
    .header-container {
        padding: 15px 20px;
        border-radius: 16px;
        flex-direction: column;
        gap: 15px;
    }
    
    .logo-icon {
        width: 140px;
        height: 50px;
    }
    
    .logo-icon img {
        max-width: 140px;
        max-height: 50px;
        width: auto;
        height: auto;
    }
    
    .logo-text h1 {
        font-size: 20px;
    }
    
    .logo-text span {
        font-size: 12px;
    }
    
    .steps {
        gap: 15px;
        flex-wrap: nowrap;
        justify-content: space-between;
        width: 100%;
    }
    
    .step {
        flex: 1;
        justify-content: center;
        text-align: center;
        min-width: 0;
    }
    
    .step span {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
        min-width: 0;
        max-width: 100%;
    }
    
    .step-icon {
        margin-bottom: 2px;
    }
    
    .calendar-card,
    .time-card {
        padding: 20px;
        border-radius: 20px;
    }
    
    .month-display h2 {
        font-size: 24px;
    }
    
    #yearDisplay {
        font-size: 24px;
    }
    
    .time-card h3 {
        font-size: 18px;
    }
    
    .calendar-grid {
        gap: 0 !important;
    }
    
    .calendar-day {
        font-size: 14px;
        border-radius: 10px;
    }
    
    .time-slots {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .time-slots-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .time-slot {
        padding: 12px 14px;
        font-size: 13px;
        border-radius: 10px;
    }
    
    .modal-container {
        width: 95%;
        margin: 10px;
        border-radius: 20px;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 14px 24px;
    }
    
    /* FIX: Show other month days on mobile to maintain grid structure */
    .calendar-day.other-month,
    .calendar-day.empty-day {
        display: flex !important;
        visibility: visible !important;
        opacity: 0.5;
    }
}

/* Mobile Medium */
@media (max-width: 480px) {
    .booking-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .main-container {
        padding: 10px;
    }
    
    .header-container {
        padding: 12px 15px;
    }
    
    .calendar-card,
    .time-card {
        padding: 15px;
        border-radius: 16px;
    }
    
    .logo {
        gap: 10px;
    }
    
    .logo-icon {
        width: 120px;
        height: 45px;
    }
    
    .logo-icon img {
        max-width: 120px;
        max-height: 45px;
        width: auto;
        height: auto;
    }
    
    .logo-text h1 {
        font-size: 18px;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .steps {
        justify-content: space-between;
        width: 100%;
        gap: 10px;
        flex-wrap: nowrap;
    }
    
    .step {
        flex: 1;
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-width: 0;
        padding: 5px 2px;
    }
    
    .step span {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        margin-top: 2px;
        text-align: center;
        min-width: 0;
    }
    
    .step-icon {
        width: 20px;
        height: 20px;
        margin-bottom: 2px;
    }
    
    .calendar-card,
    .time-card {
        padding: 15px;
        border-radius: 16px;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .header-left {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-controls {
        gap: 6px;
    }
    
    .nav-btn {
        width: 34px;
        height: 34px;
    }
    
    .month-display h2 {
        font-size: 20px;
    }
    
    #yearDisplay {
        font-size: 20px;
    }
    
    .calendar-weekdays {
        gap: 0 !important;
    }
    
    .weekday {
        font-size: 11px;
        padding: 8px 0;
        border-radius: 6px;
    }
    
    .calendar-grid {
        gap: 0 !important;
    }
    
    .calendar-day {
        font-size: 13px;
        border-radius: 8px;
    }
    
    .selected-date-info {
        padding: 15px;
        border-radius: 12px;
    }
    
    .info-icon {
        width: 36px;
        height: 36px;
    }
    
    .info-label {
        font-size: 10px;
    }
    
    .info-value {
        font-size: 14px;
    }
    
    .time-icon {
        width: 36px;
        height: 36px;
    }
    
    .time-card h3 {
        font-size: 16px;
    }
    
    .time-slots {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .time-slots-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .time-slot {
        padding: 14px;
        font-size: 14px;
    }
    
    .appointment-summary {
        padding: 15px;
        border-radius: 12px;
    }
    
    .summary-icon {
        width: 20px;
        height: 20px;
    }
    
    .summary-header span {
        font-size: 11px;
    }
    
    .continue-button {
        padding: 14px 20px;
        font-size: 14px;
        border-radius: 12px;
    }
    
    .modal-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: none;
    }
    
    .modal-header,
    .modal-body {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    .modal-summary {
        padding: 15px;
        border-radius: 10px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 14px;
        border-radius: 8px;
    }
}

/* Mobile Small */
@media (max-width: 360px) {
    .header-container {
        padding: 10px 12px;
    }
    
    .logo-text h1 {
        font-size: 16px;
    }
    
    .calendar-card,
    .time-card {
        padding: 12px;
    }
    
    .month-display {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }
    
    .month-display h2 {
        font-size: 18px;
    }
    
    #yearDisplay {
        font-size: 16px;
    }
    
    .time-card h3 {
        font-size: 14px;
    }
    
    .period-header h4 {
        font-size: 12px;
    }
    
    .time-slot {
        padding: 12px;
        font-size: 13px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .booking-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .calendar-card,
    .time-card {
        padding: 15px;
    }
    
    .time-slots {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .time-slots-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .time-slot {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .header-container {
        flex-direction: row;
        padding: 10px 15px;
    }
    
    .header-actions {
        flex-direction: row;
        gap: 15px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon,
    .section-icon,
    .time-icon,
    .info-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .spinner-ring {
        animation: none;
    }
    
    .logo-icon::before {
        animation: none;
    }
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .header-actions,
    .nav-controls,
    .continue-button,
    .modal-overlay,
    .loading-overlay {
        display: none !important;
    }
    
    .booking-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .calendar-card,
    .time-card {
        background: white !important;
        border: 1px solid #ccc !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .calendar-day.selected,
    .time-slot.selected {
        background: #333 !important;
        color: white !important;
    }
}

/* Mobil cihazlarda performans için backdrop-filter'ları kaldır */
@media (max-width: 768px) {
    * {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    .header-container,
    .card-header,
    .booking-wrapper,
    .staff-selection-card,
    .services-selection-card,
    .calendar-card,
    .time-card,
    .modal-container,
    .notification-toast,
    .loading-overlay {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}