/* DGWP Booking - Frontend Styles */

.dgwpb-search-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 0;
}

@media (max-width: 980px) {
    .dgwpb-search-wrapper {
        padding-top: 5px;
        margin-top: 0;
    }
}

.dgwpb-search-form {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dgwpb-search-form .dgwpb-form-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.dgwpb-search-form .dgwpb-form-row label {
    flex: 1 1 200px;
}

.dgwpb-search-form .dgwpb-form-row button[type="submit"] {
    flex: 0 0 auto;
}

@media (min-width: 768px) {
    .dgwpb-search-form .dgwpb-form-row {
        flex-wrap: nowrap;
        align-items: flex-end;
    }

    .dgwpb-search-form .dgwpb-form-row label {
        margin-bottom: 0;
    }

    .dgwpb-search-form .dgwpb-form-row button[type="submit"] {
        margin-bottom: 0;
    }
}

@media (max-width: 767px) {
    .dgwpb-search-form .dgwpb-form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .dgwpb-search-form .dgwpb-form-row label {
        flex: none;
        width: 100%;
        margin-bottom: 0;
    }

    .dgwpb-search-form .dgwpb-form-row button[type="submit"] {
        width: 100%;
        margin-top: 4px;
    }
}

.dgwpb-search-form label {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    color: #374151;
    font-size: 14px;
}

.dgwpb-search-form input[type="date"],
.dgwpb-search-form select {
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    width: 100%;
    min-width: 160px;
    height: 46px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    margin-top: 10px;  /* tăng khoảng cách giữa tiêu đề label và input */
}

.dgwpb-search-form input[type="date"]:focus,
.dgwpb-search-form select:focus {
    border-color: #00a98f;
    box-shadow: 0 0 0 3px rgba(0, 169, 143, 0.1);
    outline: none;
}

.dgwpb-search-form button[type="submit"] {
    background: #00a98f;
    color: white;
    border: 1px solid #00a98f;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    height: 46px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dgwpb-search-form button[type="submit"]:hover {
    background: #078875;
}

.dgwpb-room-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dgwpb-room-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.dgwpb-room-actions .button-primary {
    background: #00a98f;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dgwpb-room-actions .button-primary:hover {
    background: #078875;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 169, 143, 0.3);
}

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

@media (max-width: 600px) {
    .dgwpb-room-grid {
        grid-template-columns: 1fr;
    }
    .dgwpb-search-form .dgwpb-form-row {
        flex-direction: column;
        align-items: stretch;
    }
    .dgwpb-search-form button[type="submit"] {
        width: 100%;
    }
}

.dgwpb-room-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    background: #fff;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dgwpb-room-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #00a98f;
}

.dgwpb-room-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #f3f4f6;
}

.dgwpb-room-card .card-body {
    padding: 16px;
}

.dgwpb-room-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.dgwpb-room-card .meta {
    color: #6b7280;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.dgwpb-room-card .price-rates {
    font-size: 13px;
    line-height: 1.5;
    color: #4b5563;
    margin-bottom: 8px;
}

.dgwpb-room-card .price {
    font-weight: 700;
    color: #111827;
    font-size: 15px;
    margin: 8px 0;
}

.dgwpb-room-card .price small {
    font-weight: 400;
    color: #6b7280;
    font-size: 12px;
}

.dgwpb-room-card .card-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.dgwpb-room-card .card-actions button {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
}

.dgwpb-room-card .button-secondary {
    background: #f9fafb;
    color: #374151;
    border-color: #d1d5db;
}

.dgwpb-room-card .button-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.dgwpb-room-card .button-primary {
    background: #00a98f;
    color: white;
    border-color: #00a98f;
}

.dgwpb-room-card .button-primary:hover {
    background: #078875;
    border-color: #078875;
}

.dgwpb-room-card label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 16px 0;
    cursor: pointer;
}

.dgwpb-room-card input[type="checkbox"] {
    accent-color: #00a98f;
    margin-top: 2px;
}

/* Booking Form Styles */
#dgwpb-booking-form-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

#dgwpb-booking-form-container h4 {
    margin: 0 0 16px;
    font-size: 17px;
    color: #111827;
}

#dgwpb-booking-form p {
    margin-bottom: 14px;
}

#dgwpb-booking-form label {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    display: block;
    margin-bottom: 5px;
}

#dgwpb-booking-form input[type="text"],
#dgwpb-booking-form input[type="tel"],
#dgwpb-booking-form input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}

#dgwpb-booking-form input:focus {
    border-color: #00a98f;
    box-shadow: 0 0 0 3px rgba(0, 169, 143, 0.1);
    outline: none;
}

#dgwpb-booking-form button[type="submit"] {
    background: #00a98f;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

#dgwpb-booking-form button[type="submit"]:hover {
    background: #078875;
}

#dgwpb-booking-message {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
}

/* Icons */
.dgwpb-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
}

.dgwpb-room-card.dgwpb-selected-focused {
    border: 2px solid #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #f0f9ff;
}

/* Calendar */
#dgwpb-calendar-container {
    margin: 15px 0;
}

.dgwpb-calendar {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dgwpb-calendar th,
.dgwpb-calendar td {
    border: 1px solid #e5e7eb;
    text-align: center;
    padding: 8px 4px;
    width: 14.28%;
}

.dgwpb-calendar th {
    background: #f3f4f6;
    font-weight: 600;
}

.dgwpb-day-cell {
    cursor: pointer;
    transition: background 0.1s;
}

.dgwpb-day-cell:hover {
    background: #f3f4f6;
}

.dgwpb-day-cell.selected {
    background: #3b82f6 !important;
    color: white;
    font-weight: 600;
}

.dgwpb-day-cell.booked {
    background: #fee2e2;
    color: #991b1b;
    cursor: not-allowed;
    text-decoration: line-through;
}

.dgwpb-day-cell.pending {
    background: #fef3c7;
    color: #92400e;
}

.dgwpb-day-cell.available {
    background: #d1fae5;
}

.dgwpb-day-cell.other-month {
    color: #9ca3af;
    background: #f9fafb;
}

#dgwpb-booking-form-container {
    background: #f8fafc;
    padding: 20px;
    border-radius: 6px;
}

#dgwpb-booking-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
}

#dgwpb-search-results {
    width: 100%;
    overflow: visible;
}

.dgwpb-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.dgwpb-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}
