/* Booking details view — admin, My Account and thank-you page */

.kkb-view { margin: 0 0 24px; }
.kkb-view h2 { margin: 0 0 12px; }
.kkb-view h3 { margin: 22px 0 10px; }
.kkb-view h4 { margin: 0 0 8px; font-size: 15px; }

.kkb-view-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px;
    background: #fff;
}
.kkb-view-table th,
.kkb-view-table td {
    text-align: left;
    vertical-align: top;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    font-size: 14px;
    line-height: 1.5;
}
.kkb-view-table th { width: 30%; font-weight: 600; background: #fafafa; }
.kkb-view-table td { overflow-wrap: anywhere; }
.kkb-view-table .kkb-view-amount { text-align: right; white-space: nowrap; width: 1%; }

.kkb-view-guests {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 14px;
}
.kkb-view-guest {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 14px;
    background: #fcfcfc;
}
.kkb-view-guest .kkb-view-table { margin: 0; }
.kkb-view-guest .kkb-view-table th { width: 42%; }

.kkb-view-photo img {
    width: 72px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.kkb-view-totals { max-width: 560px; }

@media (max-width: 600px) {
    .kkb-view-guests { grid-template-columns: 1fr; }
    .kkb-view-table th { width: 45%; }
}

/* Booking tools (edit / cancel / delete) and the edit form
   ---------------------------------------------------------- */
.kkb-view-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 18px;
}
.kkb-inline-form { display: inline; margin: 0; }
.kkb-btn,
.kkb-btn-primary,
.kkb-btn-danger {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 6px;
    border: 2px solid #2c6e2f;
    background: #fff;
    color: #2c6e2f;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}
.kkb-btn-primary { background: #2c6e2f; color: #fff; }
.kkb-btn-danger  { border-color: #b32d2e; color: #b32d2e; }
.kkb-btn-danger:hover { background: #b32d2e; color: #fff; }

.wrap .kkb-view-tools .button { margin: 0; }

.kkb-view-notice {
    padding: 12px 16px;
    border-left: 4px solid #2c6e2f;
    background: #f4f8f4;
    margin: 0 0 16px;
}
.kkb-view-notice--error { border-left-color: #b32d2e; background: #fdf3f3; }

.kkb-edit-intro { margin: 0 0 14px; font-size: 14px; color: #555; }
.kkb-edit-field { margin: 0 0 12px; }
.kkb-edit-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}
.kkb-edit-field input[type="text"],
.kkb-edit-field input[type="email"],
.kkb-edit-field input[type="date"],
.kkb-edit-field select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}
.kkb-edit-hint { display: block; margin-top: 4px; font-size: 12px; color: #777; }
.kkb-edit-actions { margin-top: 16px; display: flex; gap: 10px; align-items: center; }

/* Editing what was booked (admin only)
   ---------------------------------------------------------- */
.kkb-edit-heading {
    margin: 22px 0 10px;
    font-size: 15px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e5e5;
}
.kkb-edit-package {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 14px 16px;
    background: #fcfcfc;
    margin-bottom: 8px;
}
.kkb-edit-package .kkb-edit-field:last-child { margin-bottom: 0; }
.kkb-edit-nights {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-bottom: 4px;
}
.kkb-edit-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 400;
    margin: 0 14px 4px 0;
    white-space: nowrap;
}
.kkb-edit-check input { margin: 0; }
.kkb-edit-extra {
    display: block;
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    font-weight: 400;
}
.kkb-edit-extra strong { font-weight: 600; }
.kkb-edit-spare {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #999;
    text-transform: none;
}
.kkb-edit-off { display: none !important; }

/* My Account layout
   ----------------------------------------------------------
   WooCommerce gives the account navigation close to a third of the page, which squeezes the
   booking tables into a narrow strip down the right. Hand most of that width back to the content. */
.woocommerce-account .woocommerce-MyAccount-navigation { width: 22%; }
.woocommerce-account .woocommerce-MyAccount-content    { width: 74%; }

@media (max-width: 782px) {
    .woocommerce-account .woocommerce-MyAccount-navigation,
    .woocommerce-account .woocommerce-MyAccount-content {
        width: 100%;
        float: none;
    }
}

/* My Account → Orders: the booking shown on the row itself
   ----------------------------------------------------------
   One cell carrying the reference, the package, the party size and the dates, so a customer can
   read the list without opening anything. Set in small stacked lines rather than a sentence,
   because the column is narrow on desktop and becomes a block on a phone. */
.kkb-orders-title { margin: 0 0 6px; }
.kkb-orders-intro { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: #555; }

.woocommerce-orders-table__header-kkb-booking,
.woocommerce-orders-table__cell-kkb-booking { width: 34%; }

.kkb-order-brief { display: block; line-height: 1.45; }
.kkb-order-brief > span { display: block; }
.kkb-order-ref  { font-weight: 700; }
.kkb-order-kind { font-size: 13px; font-weight: 600; color: #2c6e2f; }
.kkb-order-line { font-size: 13px; color: #555; }
.kkb-order-none { color: #999; }

@media (max-width: 768px) {
    .woocommerce-orders-table__header-kkb-booking,
    .woocommerce-orders-table__cell-kkb-booking { width: auto; }
    .kkb-order-brief { text-align: left; }
}
