/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f4f4f4;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 25px;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    position: relative;
}

/* Header Styles */
.header {
    text-align: center;
    background: linear-gradient(to right, #2c3e50, #3498db);
    margin: -25px -25px 25px -25px;
    padding: 30px 25px;
    border-radius: 12px 12px 0 0;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: white;
    line-height: 1.2;
}

.header h3 {
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 15px;
    font-weight: normal;
    padding: 0 15px;
}

.header p {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    color: white !important;
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

.header p a[href^="tel"],
.header p a[href^="tel"]:hover,
.header p a[href^="tel"]:visited,
.header p a[href^="tel"]:active {
    color: white !important;
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
}

/* Style đặc biệt cho iOS */
@supports (-webkit-touch-callout: none) {
    .date-input-container {
        max-width: 100%;
        width: 100%;
    }
    
    .date-input-container input {
        font-size: 16px;
        padding: 12px 15px 12px 40px;
        width: 100%;
        min-height: 44px;
        box-sizing: border-box;
    }

    .calendar-icon {
        left: 12px;
        font-size: 1.2rem;
    }

    /* Xử lý số điện thoại trên Safari */
    .header p a[href^="tel"] {
        color: white !important;
        text-decoration: none !important;
        -webkit-text-decoration: none !important;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .date-input-container {
        max-width: 100%;
        width: 100%;
    }
    
    .date-input-container input {
        padding: 12px 15px 12px 40px;
        font-size: 16px;
        height: 44px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .calendar-icon {
        left: 12px;
        font-size: 1.2rem;
    }
}

/* Form heading */
h2 {
    text-align: center;
    color: #2c3e50;
    margin: 15px 0;
    font-size: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }

    .header {
        margin: -15px -15px 15px -15px;
        padding: 20px 15px;
    }

    .header h1 {
        font-size: 1.8rem;
        margin-bottom: 10px;
        padding: 0 10px;
    }

    .header h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
        padding: 0 10px;
    }

    .header p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 5px;
        padding: 10px;
    }

    .header {
        margin: -10px -10px 10px -10px;
        padding: 15px 10px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header h3 {
        font-size: 1rem;
        padding: 0 5px;
    }
}

/* Remove old header styles */
.container h3:first-child {
    display: none;
}

.container > p {
    display: none;
}

.container > a {
    display: block;
    text-align: center;
    padding: 15px 30px;
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 300px;
    width: 100%;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.container > a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background: linear-gradient(to right, #2980b9, #2573a7);
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
}

label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 1.1rem;
    margin-top: 5px;
}

input[type="text"],
input[type="tel"],
input[type="date"] {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Service Buttons */
.button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 10px 0;
}

.button-group label {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    background-color: white;
}

/* Icon Wrapper Styles */
.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    position: relative;
}

/* Màu sắc đơn giản cho từng dịch vụ */
.icon-wrapper.construction { background-color: #fdcb6e; }
.icon-wrapper.computer { background-color: #00cec9; }
.icon-wrapper.ac { background-color: #74b9ff; }
.icon-wrapper.heater { background-color: #ff7675; }
.icon-wrapper.electric { background-color: #ffa502; }
.icon-wrapper.plumbing { background-color: #48dbfb; }
.icon-wrapper.water-heater { background-color: #81ecec; }
.icon-wrapper.other { background-color: #a8e6cf; }

/* Icon styles */
.button-group label i {
    font-size: 1.8rem;
    color: #2c3e50;
}

/* Check icon styles */
.check-icon {
    display: none;
}

/* Selected state */
.button-group label.selected .check-icon {
    opacity: 1;
    transform: scale(1);
}

/* Hover effect */
.button-group label:hover {
    transform: translateY(-2px);
}

.button-group label span {
    font-size: 1rem;
    font-weight: 500;
    color: #2c3e50;
    text-align: center;
    margin-top: 8px;
}

/* Time Buttons */
#time-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 5px 0;
}

#time-buttons button {
    padding: 12px;
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

#time-buttons button:hover {
    background-color: #f7fbfe;
    border-color: #3498db;
}

#time-buttons button.selected {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    border-color: transparent;
}

/* Submit Button */
button[type="submit"] {
    background: linear-gradient(to right, #2c3e50, #3498db);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Selected Info Display */
.selected-info {
    font-size: 1.1rem;
    color: #2c3e50;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 5px 0 10px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Thêm animation khi thay đổi nội dung */
@keyframes highlight {
    0% {
        background-position: 100%;
        transform: scale(1);
    }
    50% {
        background-position: 0%;
        transform: scale(1.01);
    }
    100% {
        background-position: 100%;
        transform: scale(1);
    }
}

#selected-services.updated {
    animation: highlight 0.5s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }

    .container h3:first-child {
        margin: -15px -15px 15px -15px;
        padding: 20px 15px;
        font-size: 1.2rem;
    }

    .button-group {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .icon-wrapper {
        width: 50px;
        height: 50px;
    }

    .button-group label i:not(.check-icon) {
        font-size: 1.5rem;
    }

    .button-group label {
        padding: 15px 10px;
    }

    #time-buttons {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    h1:first-of-type {
        font-size: 2rem;
    }

    .container > a {
        max-width: 100%;
        margin: 15px 0;
        font-size: 1rem;
        padding: 12px 20px;
    }

    input[type="text"],
    input[type="tel"],
    input[type="date"],
    button {
        font-size: 16px; /* Prevents zoom on mobile */
    }

    .check-icon {
        font-size: 0.7rem;
        padding: 3px;
    }

    .large-input,
    .large-buttons button {
        font-size: 16px; /* Prevents zoom on mobile */
        padding: 12px 15px;
    }
}

/* Small screens */
@media (max-width: 480px) {
    .container {
        margin: 5px;
        padding: 10px;
    }

    .button-group label {
        padding: 10px;
    }

    #time-buttons {
        grid-template-columns: repeat(3, 1fr);
    }

    button[type="submit"] {
        padding: 12px 20px;
        font-size: 1.1rem;
    }
}

/* Large input for date */
.large-input {
    padding: 15px 20px;
    font-size: 1.2rem;
    width: 100%;
    max-width: 400px;
    margin: 10px 0;
    cursor: pointer;
}

/* Tùy chỉnh calendar icon cho input date */
input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Ẩn icon mặc định trên Firefox */
input[type="date"]::-moz-calendar-picker-indicator {
    opacity: 0;
}

/* Ẩn clear button trên Edge */
input[type="date"]::-ms-clear {
    display: none;
}

/* Larger time buttons */
.large-buttons button {
    padding: 15px 20px;
    font-size: 1.1rem;
}

/* Bỏ các break line không cần thiết */
br {
    display: none;
}

/* Ẩn input checkbox mặc định */
.button-group label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

/* Style cho trạng thái selected của service button */
.button-group label.selected {
    border-color: #3498db;
    background-color: #f8fdff;
}

/* Custom Checkbox Styles */
.button-group label {
    position: relative;
}

.checkbox-custom {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background: white;
}

.button-group label.selected .checkbox-custom {
    background: #3498db;
    border-color: #3498db;
}

.button-group label.selected .checkbox-custom:after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Ẩn checkbox mặc định */
.button-group label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .large-input {
        padding: 12px 15px;
        font-size: 1.1rem;
    }
    
    input[type="date"]::-webkit-calendar-picker-indicator {
        width: 25px;
        height: 25px;
    }
}

.date-input-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.date-input-container input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: right;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: white;
}

/* Style đặc biệt cho iOS */
@supports (-webkit-touch-callout: none) {
    .date-input-container {
        max-width: 100%;
    }
    
    .date-input-container input {
        font-size: 16px;
        padding: 12px 15px 12px 40px;
        width: 100%;
        min-height: 44px;
    }

    .calendar-icon {
        left: 12px;
        font-size: 1.2rem;
    }
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .date-input-container {
        max-width: 100%;
    }
    
    .date-input-container input {
        padding: 12px 15px 12px 40px;
        font-size: 16px;
        height: 44px;
    }
    
    .calendar-icon {
        left: 12px;
        font-size: 1.2rem;
    }
}

/* Ẩn icon mặc định của input date */
input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Ẩn icon mặc định trên Firefox */
input[type="date"]::-moz-calendar-picker-indicator {
    opacity: 0;
}

/* Ẩn clear button trên Edge */
input[type="date"]::-ms-clear {
    display: none;
}

.calendar-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #3498db;
    font-size: 1.5rem;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .date-input-container input {
        padding: 12px 15px 12px 40px;
        font-size: 1.1rem;
        text-align: right;
    }
    
    .calendar-icon {
        left: 15px;
        font-size: 1.2rem;
    }
}
.panel-footer {
   position: fixed;
   left: 0;
   bottom: 0;
   width: 100%;
   color: red;
   text-align: center;
   background-color: #f3f1f1;
  
}