/* Mobile Responsive CSS for Hours Selection Cards */

/* Disable autocomplete suggestions */
.hour_card input[data-type="time"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #fff;
    autocomplete: off;
}

.hour_card input[data-type="time"]::-webkit-outer-spin-button,
.hour_card input[data-type="time"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hour_card input[data-type="time"]::-webkit-contacts-auto-fill-button,
.hour_card input[data-type="time"]::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    height: 0;
    width: 0;
    margin: 0;
}

/* Base styles for hour cards */
.hour_card {
    border: 1px solid #e0e6ed;
    /* border-radius: 8px; */
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.hour_card .daysDiv .row {
    margin: 0;
}

.hour_card .days {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hour_card .days input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #007bff;
}

.hour_card .days label {
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    cursor: pointer;
}

.hour_card .input-group-text {
    font-size: 13px;
    min-width: 50px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #ced4da;
    font-weight: 500;
    color: #495057;
}

.hour_card .form-control {
    font-size: 13px;
    padding: 10px 12px;
    /* border-left: none; */
    background: #fff;
    transition: all 0.2s ease;
}

.hour_card .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.15);
    background: #fff;
}

.hour_card .form-control::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

/* Mobile specific styles - 576px and below */
@media (max-width: 576px) {
    .hour_card {
        margin-bottom: 20px;
        padding: 18px 15px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .hour_card .daysDiv .row.mb-2 {
        border-bottom: 1px solid #e9ecef;
    }
    
    .hour_card .daysDiv .row:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0 !important;
    }
    
    /* Change layout to vertical stacking on mobile */
    .hour_card .daysDiv .row.align-items-center {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    /* Day name section - full width on separate line */
    .hour_card .col-3.days {
        flex: none !important;
        max-width: none !important;
        width: 100%;
        padding: 8px 3px;
        justify-content: flex-start;
    }
    
    .hour_card .days input[type="checkbox"] {
        margin-right: 0 !important;
        transform: scale(0.8);
        accent-color: #007bff;
    }
    
    .hour_card .days label {
        font-size: 18px;
        font-weight: 700 !important;
        color: #2c3e50;
        margin-bottom: 0;
    }
    
    /* Time selection section - full width on separate line */
    .hour_card .col-9 {
        flex: none !important;
        max-width: none !important;
        width: 100%;
        padding: 0;
        margin-top: 0;
    }
    
    .hour_card .col-6 {
        padding: 0 6px;
        margin-bottom: 12px;
    }
    
    .hour_card .col-6:first-child {
        padding-left: 0;
        padding-right: 10px;
    }
    
    .hour_card .col-6:last-child {
        padding-right: 0;
        padding-left: 10px;
    }
    
    .hour_card .input-group {
        margin-bottom: 0;
        overflow: hidden;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        background: #fff;
    }
    
    .hour_card .input-group-text {
        font-size: 14px;
        min-width: 60px;    
        font-weight: 600;
        color: rgb(73, 80, 87);
        background: linear-gradient(135deg, rgb(248, 249, 250) 0%, rgb(233, 236, 239) 100%);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hour_card .form-control {
        font-size: 15px;
        padding: 12px 15px;
        height: auto;
        background: #fff;
        font-weight: 500;
        min-height: 48px;
    }
    
    .hour_card .form-control:focus {
        box-shadow: 0 0 0 0.25rem rgba(0,123,255,0.25);
    }
    
    /* Error messages */
    .hour_card .text-danger {
        font-size: 12px !important;
        margin-top: 6px;
        display: block;
        font-weight: 500;
        padding-left: 5px;
    }
    
    /* Hide hours checkbox section */
    .hour_card .form-label.mt-1 {
        font-size: 14px;
        padding: 18px 15px;
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        border: 1px solid #e9ecef;
        display: flex;
        align-items: flex-start;
        flex-wrap: wrap;
    }
    
    .hour_card .form-label.mt-1 span:first-child {
        font-size: 16px !important;
        font-weight: 600;
        color: #2c3e50;
    }
    
    .hour_card .form-label.mt-1 .text-muted {
        font-size: 11px !important;
        display: block;
        margin-top: 8px;
        width: 100%;
        line-height: 1.4;
    }
    
    .hour_card #hideHours {
        margin: 0 12px 0 10px;
        transform: scale(1.3);
        accent-color: #007bff;
    }
}

/* Tablet specific styles - 577px to 767px */
@media (min-width: 577px) and (max-width: 767px) {
    .hour_card {
        padding: 12px;
    }
    
    .hour_card .days {
        gap: 6px;
    }
    
    .hour_card .days label {
        font-size: 13px;
    }
    
    .hour_card .col-6 {
        padding: 0 4px;
    }
    
    .hour_card .input-group-text {
        min-width: 48px;
        font-size: 12px;
    }
    
    .hour_card .form-control {
        font-size: 12px;
        padding: 7px 10px;
    }

    .hour_card .text-danger {
        font-size: 10px !important;
    }
}

/* Small tablet - 768px to 991px */
@media (min-width: 768px) and (max-width: 991px) {
    .hour_card .col-3 {
        flex: 0 0 30%;
        max-width: 30%;
    }
    
    .hour_card .col-9 {
        flex: 0 0 70%;
        max-width: 70%;
    }
    
    .hour_card .days label {
        font-size: 13px;
    }
    
    .hour_card .input-group-text {
        font-size: 12px;
    }
    
    .hour_card .form-control {
        font-size: 12px;
    }
}

/* Very small devices - 320px and below */
@media (max-width: 320px) {
    .hour_card {
        padding: 12px 10px;
    }
    
    .hour_card .col-6 {
        padding: 0 4px;
    }
    
    .hour_card .input-group-text {
        font-size: 12px;
        min-width: 50px;
        padding: 8px 8px;
    }
    
    .hour_card .form-control {
        font-size: 13px;
        padding: 8px 10px;
    }
    
    .hour_card .days label {
        font-size: 16px;
    }
    
    .hour_card .text-danger {
        font-size: 11px !important;
    }
    
    /* .hour_card .col-3.days {
        padding: 10px 12px;
    } */
}

/* Focus states for better mobile interaction */
@media (max-width: 767px) {
    .hour_card .form-control:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }
    
    .hour_card input[type="checkbox"]:focus {
        outline: 2px solid #007bff;
        outline-offset: 2px;
    }
    
    .hour_card .input-group-text {
        border-radius: 3px 0 0 3px;
    }
    
    .hour_card .form-control {
        border-radius: 0 3px 3px 0;
    }
}

/* Additional spacing fixes for mobile */
@media (max-width: 576px) {
    /* Ensure proper spacing between form groups */
    .hour_card + .form-group,
    .form-group + .hour_card {
        margin-top: 20px;
    }
    
    /* Better touch targets */
    .hour_card input[type="checkbox"] {
        min-width: 20px;
        min-height: 20px;
    }
    
    .hour_card .days label {
        min-height: 24px;
        display: flex;
        align-items: center;
    }
    
    .hour_card .input-group {
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
}