/**
 * Booking System Styles
 * Consolidated CSS for all booking-related pages
 * @package Lupis
 */

/* ===================================
   BOOKING FORM STYLES
   =================================== */

.booking-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.booking-form {
    max-width: 660px;
    width: 100%;
    padding: 1rem;
    font-family: Arial, sans-serif;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.booking-calc {
    max-width: 460px;
    width: 100%;
    padding: 1rem;
    font-family: Arial, sans-serif;
    background: #dadada;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.booking-form .group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.3rem;
}

.booking-form label {
    font-weight: 600;
    color: #333;
}

.booking-form input,
.booking-form select,
.booking-form textarea {
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.booking-form fieldset.group {
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 0.3rem;
}

.booking-form fieldset.group legend {
    font-weight: 600;
}

.booking-form button {
    background-color: #0073e6;
    color: white;
    border: none;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.booking-form button:hover {
    background-color: #005bb5;
}

.dimension-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.dimension-field label {
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.child-age-field {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.child-age-field label {
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: #333;
}

.child-age-field input[type="number"] {
    padding: 0.6rem;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    max-width: 120px;
}

.child-age-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dimension-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.dimension-pair {
    display: flex;
    flex-direction: column;
    min-width: 100px;
    flex: 1;
}

.dimension-pair label {
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.dimension-pair input {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* ===================================
   ADMIN TABLE STYLES
   =================================== */

.responsive-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.responsive-table th,
.responsive-table td {
    padding: 8px 10px;
    border: 1px solid #ccc;
    text-align: left;
    vertical-align: top;
}

.responsive-table thead {
    background-color: #f9f9f9;
    position: sticky;
    top: 0;
}

.responsive-table .button {
    background-color: #0073e6;
    color: white;
    border: none;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    padding: 0.5rem 1rem;
    text-decoration: none;
    display: inline-block;
}

.responsive-table .button:hover {
    background-color: #005bb5;
}

/* Status Dropdown */
.status-select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.responsive-table td:nth-child(10),
.responsive-table th:nth-child(10) {
    min-width: 150px;
}

.status-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.status-unconfirmed {
    background-color: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-payed {
    background-color: #d4edda;
    color: #155724;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

.status-message {
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* ===================================
   EDIT FORM STYLES
   =================================== */

.edit-form-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.edit-form {
    display: grid;
    gap: 1.5rem;
}

.form-section {
    border: 1px solid #ddd;
    padding: 1.5rem;
    border-radius: 6px;
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0073e6;
    color: #0073e6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row.full {
    grid-template-columns: 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.dimension-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #0073e6;
    color: white;
}

.btn-primary:hover {
    background-color: #005bb5;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: none;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ===================================
   ADMIN NAVIGATION
   =================================== */

.admin-nav {
    background: #f8f9fa;
    border-bottom: 2px solid #0073e6;
    padding: 0;
    margin-bottom: 2rem;
}

.admin-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.admin-nav li {
    margin: 0;
}

.admin-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    border-right: 1px solid #ddd;
    transition: all 0.3s ease;
    font-weight: 500;
}

.admin-nav a:hover {
    background: #e9ecef;
    color: #0073e6;
}

.admin-nav a.active {
    background: #0073e6;
    color: white;
}

/* ===================================
   RESPONSIVE STYLES
   =================================== */

@media (min-width: 600px) {
    .booking-form .group {
        flex-direction: row;
        align-items: center;
    }

    .booking-form .group label {
        width: 35%;
        margin-bottom: 0;
    }

    .booking-form .group input,
    .booking-form .group select,
    .booking-form .group textarea {
        width: 65%;
    }

    .booking-form fieldset.group label {
        width: 100%;
    }

    .booking-form fieldset.group input {
        margin-bottom: 0.3rem;
    }

    .dimension-field {
        flex-direction: row;
        align-items: center;
    }

    .dimension-field label {
        width: 35%;
        margin-bottom: 0;
    }

    .dimension-field input {
        width: 65%;
    }
}

@media screen and (max-width: 768px) {
    .hidden-on-mobile {
        display: none;
    }

    .responsive-table {
        font-size: 13px;
    }

    .admin-nav ul {
        flex-direction: column;
    }

    .admin-nav a {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .dimension-inputs {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   AVAILABILITY MATRIX STYLES
   =================================== */

#availability-matrix,
#matrix-header,
#matrix-body {
    margin: 0;
    padding: 0;
}

.matrix-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.matrix-controls button {
    background-color: #0073e6;
    color: white;
    border: none;
    font-size: 1rem;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.matrix-controls button:hover {
    background-color: #005bb5;
}

.matrix-grid {
    overflow-x: auto;
    border: 1px solid #ccc;
}

.matrix-header,
.row {
    display: flex;
}

.cell {
    flex: 0 0 70px;
    padding: 1px;
    text-align: center;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.cell.label {
    margin-left: 0;
    min-width: 120px;
    text-align: left;
    font-weight: bold;
}

.cell.header {
    font-weight: bold;
    background: #f0f0f0;
}

.row.zone-header {
    font-weight: bold;
    background: #000;
    color: #FFF;
    border: 1px solid #000;
}

.cell.available {
    background: #aaffaa;
}

.cell.booked {
    background: #f88;
}

.label {
    min-height: auto !important;
    margin-bottom: auto !important;
}
