/* Simple Booking Form Frontend Styles v2.5 */

/* Reset cơ bản (tùy chọn) */
.sbf-booking-form *,
.sbf-booking-form *::before,
.sbf-booking-form *::after {
    box-sizing: border-box;
}

/* Container chính của form */
.sbf-booking-form {
    border: 1px solid #e0e0e0;
    padding: 25px 30px;
    max-width: 800px;
    margin: 20px auto;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; /* Font giống admin WP */
    font-size: 14px;
    line-height: 1.6;
}

/* Grid Layout */
.sbf-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mặc định 1 cột */
    gap: 18px 25px; /* Khoảng cách giữa các hàng và cột */
    margin-bottom: 20px;
}
/* Áp dụng 2 cột cho màn hình lớn hơn */
@media (min-width: 570px) {
   .sbf-grid {
       grid-template-columns: 1fr 1fr;
   }
   .sbf-form-group-full-width {
       grid-column: 1 / -1; /* Chiếm cả 2 cột */
   }
}


/* Nhóm trường (label + input) */
.sbf-form-group {
    display: flex;
    flex-direction: column;
    position: relative; /* Cho việc định vị message lỗi */
}

/* Nhãn (Label) */
.sbf-form-group label {
    margin-bottom: 6px;
    font-weight: 600;
    display: inline-flex; /* Để icon và text thẳng hàng */
    align-items: center;
    font-size: 13px;
    color: #333;
    cursor: pointer; /* Cho phép click label để focus input */
}
.sbf-form-group label .dashicons {
    margin-right: 5px;
    font-size: 18px;
    color: #555;
    vertical-align: middle;
}
.sbf-form-group label abbr.required {
    color: #dc3545; /* Màu đỏ cho dấu * bắt buộc */
    font-weight: bold;
    text-decoration: none;
    margin-left: 3px;
}

/* Input, Select */
.sbf-form-group input[type="text"],
.sbf-form-group input[type="email"],
.sbf-form-group input[type="tel"],
.sbf-form-group input[type="datetime-local"],
.sbf-form-group select {
    width: 100%;
    padding: 10px 12px; /* Giảm padding một chút */
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    -webkit-appearance: none; /* Tắt giao diện mặc định của trình duyệt (cho select) */
    -moz-appearance: none;
    appearance: none;
}
/* Thêm mũi tên cho select */
.sbf-form-group select {
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%230073aa%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 8px 10px;
    padding-right: 35px; /* Chừa chỗ cho mũi tên */
}


.sbf-form-group input:focus,
.sbf-form-group select:focus {
    border-color: #2575fc; /* Màu focus */
    outline: none;
    box-shadow: 0 0 0 1px #2575fc;
}

/* Input datetime-local */
input[type="datetime-local"] {
    cursor: text;
}
/* Style icon lịch mặc định của trình duyệt (Webkit) */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    margin-left: 5px; /* Khoảng cách với text */
    transition: opacity 0.2s;
}
 input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 0.9;
}

/* Radio Buttons */
.sbf-service-type .sbf-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding: 5px 0; /* Căn chỉnh với các input khác */
}
.sbf-radio-label {
    font-weight: normal !important; /* Ghi đè label mặc định */
    display: inline-flex !important;
    align-items: center;
    cursor: pointer;
    margin: 0 !important; /* Reset margin */
    position: relative;
}
.sbf-radio-label input[type="radio"] {
   margin-right: 8px;
   accent-color: #2575fc; /* Màu radio được chọn */
   width: 16px;
   height: 16px;
   flex-shrink: 0;
   vertical-align: middle; /* Căn giữa với text */
}

/* Khu vực hiển thị giá */
.sbf-price-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid #17a2b8; /* Màu accent khác */
    padding: 12px 18px;
    margin-top: 20px;
    margin-bottom: 25px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    transition: all 0.3s ease-in-out; /* Thêm hiệu ứng khi ẩn/hiện */
}
.sbf-price-section strong {
    color: #343a40;
    font-weight: 600;
}
.sbf-price-amount {
    font-size: 1.3em;
    font-weight: bold;
    color: #0056b3; /* Màu giá */
}

/* Nút Submit */
.sbf-submit-row {
    text-align: right;
    margin-top: 15px;
}
.sbf-submit-button {
    background-color: #28a745;
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5; /* Căn chỉnh text và icon */
}
.sbf-submit-button .dashicons {
    font-size: 20px;
    height: auto; /* Cho phép tự điều chỉnh chiều cao */
}
.sbf-submit-button:hover {
    background-color: #218838;
}
.sbf-submit-button:active {
     transform: scale(0.97);
}
.sbf-submit-button:focus {
     outline: 2px solid #0056b3; /* Thêm outline focus */
     outline-offset: 2px;
}


/* Thông báo (Lỗi/Thành công chung) */
.sbf-notice {
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 1em;
    line-height: 1.5;
    display: flex; /* Dùng flex để căn icon (nếu có) */
    align-items: center;
    gap: 10px;
}
.sbf-notice strong { font-weight: 600; }
.sbf-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.sbf-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
/* Icon cho thông báo (tùy chọn) */
.sbf-notice::before {
    font-family: "dashicons";
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}
.sbf-success::before { content: "\f147"; color: #155724; } /* Icon check */
.sbf-error::before { content: "\f534"; color: #721c24; } /* Icon warning */


/* Mô tả trường & Lỗi Validation */
.sbf-field-description {
    font-size: 0.85em;
    color: #555;
    margin-top: 5px;
    display: block;
}
.sbf-input-error { /* Class thêm vào input/select bị lỗi */
    border-color: #dc3545 !important;
    background-color: #fff6f6;
}
.sbf-has-error { /* Class thêm vào group radio bị lỗi */
    /* Có thể thêm style cho cả group */
}
.sbf-error-message {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
    width: 100%;
    font-weight: 500;
}
/* Message lỗi của group radio */
.sbf-service-type .sbf-error-message {
    margin-top: 8px; /* Khoảng cách với radio cuối */
}