/**
 * Booking Entries admin UI.
 */

/* —— Status cards —— */

.booking-stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 16px 0 20px;
}

.booking-stats-dashboard .stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.booking-stats-dashboard .stat-card:hover,
.booking-stats-dashboard .stat-card:focus {
    border-color: #8c8f94;
    outline: none;
}

.booking-stats-dashboard .stat-card.is-current {
    box-shadow: 0 0 0 1px #2271b1;
    border-color: #2271b1;
}

.booking-stats-dashboard .stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #f0f6fc;
    color: #2271b1;
}

.booking-stats-dashboard .stat-icon .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.booking-stats-dashboard .stat-completed .stat-icon {
    background: #edfaef;
    color: #007017;
}

.booking-stats-dashboard .stat-pending .stat-icon {
    background: #fcf9e8;
    color: #996800;
}

.booking-stats-dashboard .stat-failed .stat-icon {
    background: #fcf0f1;
    color: #b32d2e;
}

.booking-stats-dashboard .stat-cancelled .stat-icon {
    background: #f0f0f1;
    color: #50575e;
}

.booking-stats-dashboard .stat-enquiry .stat-icon {
    background: #f0f6fc;
    color: #135e96;
}

.booking-stats-dashboard .stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.booking-stats-dashboard .stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
    color: #646970;
}

.booking-stats-dashboard .stat-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    color: #1d2327;
}

/* —— Entries panel (filters + table) —— */

.booking-entries-panel {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    overflow: hidden;
}

.booking-entries-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e4e7;
    background: #f6f7f7;
}

.booking-entries-panel__header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.booking-entries-panel__header p {
    margin: 4px 0 0;
    color: #646970;
    font-size: 13px;
}

.booking-entries-panel__body {
    padding: 16px 20px 20px;
}

.booking-entries-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    padding: 0;
}

.booking-entries-filters__controls,
.booking-entries-filters__search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.booking-entries-filters select,
.booking-entries-filters input[type="search"] {
    min-width: 160px;
    margin: 0;
    border-radius: 4px;
}

.booking-entries-filters__search input[type="search"] {
    min-width: 220px;
}

.booking-entries-table-form {
    clear: both;
    margin: 0;
}

.booking-entries-table-form .tablenav {
    margin: 0 0 12px;
    padding: 20px 0;
}

.booking-entries-table-form .tablenav .actions {
    padding: 0;
}

.booking-entries-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 6px;
}

.booking-entries-enhanced .wp-list-table {
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    box-shadow: none;
    table-layout: fixed;
    width: 100%;
    min-width: 1000px;
    margin: 0;
}

.booking-entries-enhanced .wp-list-table tfoot {
    display: none;
}

.booking-entries-enhanced .wp-list-table thead th,
.booking-entries-enhanced .wp-list-table thead td {
    background: #f6f7f7;
    border-bottom: 1px solid #dcdcde;
    border-top: 0;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #50575e;
    padding: 12px 14px;
}

.booking-entries-enhanced .wp-list-table th,
.booking-entries-enhanced .wp-list-table td {
    padding: 14px;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    border-bottom: 1px solid #f0f0f1;
}

.booking-entries-enhanced .wp-list-table tbody tr:last-child th,
.booking-entries-enhanced .wp-list-table tbody tr:last-child td {
    border-bottom: 0;
}

.booking-entries-enhanced .wp-list-table tbody tr:hover td,
.booking-entries-enhanced .wp-list-table tbody tr:hover th {
    background: #f6f7f7;
}

.booking-entries-enhanced .wp-list-table .check-column,
.booking-entries-enhanced .wp-list-table .column-cb {
    width: 40px;
    padding-left: 14px;
}

.booking-entries-enhanced .wp-list-table .column-id {
    width: 100px;
}

.booking-entries-enhanced .wp-list-table .column-property {
    width: 24%;
}

.booking-entries-enhanced .wp-list-table .column-check_in {
    width: 110px;
}

.booking-entries-enhanced .wp-list-table .column-nights {
    width: 90px;
}

.booking-entries-enhanced .wp-list-table .column-guests {
    width: 150px;
}

.booking-entries-enhanced .wp-list-table .column-amount {
    width: 110px;
}

.booking-entries-enhanced .wp-list-table .column-status {
    width: 140px;
}

.booking-entries-enhanced .wp-list-table .column-date {
    width: 110px;
}

.booking-entries-enhanced .wp-list-table .row-title {
    text-decoration: none;
    font-weight: 600;
}

.booking-entries-enhanced .wp-list-table .row-actions {
    color: #646970;
}

.booking-cell-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}

.booking-cell-title {
    color: #1d2327;
    font-size: 13px;
    font-weight: 500;
}

.booking-cell-meta {
    color: #646970;
    font-size: 12px;
}

.booking-cell-property {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.4;
    word-break: break-word;
    text-decoration: none;
    font-weight: 500;
}

.booking-cell-property:hover {
    text-decoration: underline;
}

.booking-cell-date,
.booking-cell-amount,
.booking-cell-nowrap {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.booking-cell-amount {
    font-weight: 600;
    color: #1d2327;
}

.booking-cell-muted {
    color: #8c8f94;
}

.booking-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    line-height: 1.3;
}

.booking-status-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.booking-status-badge.status-enquiry {
    background: #f0f6fc;
    color: #135e96;
}

.booking-status-badge.status-completed {
    background: #edfaef;
    color: #007017;
}

.booking-status-badge.status-pending {
    background: #fcf9e8;
    color: #996800;
}

.booking-status-badge.status-failed {
    background: #fcf0f1;
    color: #b32d2e;
}

.booking-status-badge.status-cancelled {
    background: #f0f0f1;
    color: #50575e;
}

.booking-entries-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f6f7f7;
    border-radius: 6px;
    border: 1px dashed #c3c4c7;
}

.booking-entries-empty p {
    margin: 0 0 12px;
    color: #646970;
}

@media (max-width: 782px) {
    .booking-entries-panel__body {
        padding: 14px;
    }

    .booking-entries-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .booking-entries-filters__controls,
    .booking-entries-filters__search {
        width: 100%;
    }

    .booking-entries-filters select,
    .booking-entries-filters input[type="search"] {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
    }
}

/* —— Single booking entry —— */

@media print {
    .booking-entry-single .entry-header-actions,
    .booking-entry-single .add-note-form,
    .booking-entry-single .sidebar-card h3,
    .booking-entry-single form,
    .booking-entry-single .button {
        display: none !important;
    }
}

.booking-entry-single .entry-header,
.booking-entry-single .entry-section,
.booking-entry-single .sidebar-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.booking-entry-single .entry-header {
    margin: 0 0 20px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.booking-entry-single .entry-header h1 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    font-size: 23px;
    font-weight: 400;
    line-height: 1.3;
}

.booking-entry-single .entry-header h1 .dashicons,
.booking-entry-single .entry-header-actions .dashicons,
.booking-entry-single .section-header h2 .dashicons,
.booking-entry-single .sidebar-card h3 .dashicons,
.booking-entry-single .button .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
}

.booking-entry-single .entry-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.booking-entry-single .entry-header-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.booking-entry-single .entry-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

.booking-entry-single .entry-section {
    margin: 0 0 20px;
    overflow: hidden;
}

.booking-entry-single .section-header {
    margin: 0;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e4e7;
    background: #f6f7f7;
}

.booking-entry-single .section-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.booking-entry-single .section-content {
    margin: 0;
    padding: 20px 24px;
}

.booking-entry-single .booking-details-content {
    padding-bottom: 18px;
}

.booking-entry-single .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 36px 24px;
}

.booking-entry-single .info-grid--booking {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.booking-entry-single .info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.booking-entry-single .info-item--wide {
    grid-column: 1 / -1;
}

.booking-entry-single .info-item label,
.booking-entry-single .meta-item label {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.booking-entry-single .info-value {
    font-size: 16px;
    line-height: 1.5;
    word-break: break-word;
}

.booking-entry-single .info-value a {
    display: inline-flex;
    align-items: flex-start;
    gap: 4px;
    max-width: 100%;
    text-decoration: none;
}

.booking-entry-single .info-value a:hover {
    color: #135e96;
}

.booking-entry-single .info-value .dashicons {
    flex-shrink: 0;
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.booking-entry-single .payment-block {
    margin-top: 0;
    padding-top: 0;
    width: 100%;
}

.booking-entry-single .payment-block__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0 0 10px;
    border-bottom: 1px solid #e2e4e7;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
}

.booking-entry-single .payment-block__title .dashicons {
    color: #2271b1;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.booking-entry-single .payment-breakdown {
    margin: 0;
}

.booking-entry-single .payment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e4e7;
    font-size: 1.1em;
    line-height: 1.45;
    font-weight:600
}

.booking-entry-single .payment-row__label {
    flex: 1 1 auto;
    min-width: 0;

}

.booking-entry-single .payment-row__amount {
    flex: 0 0 auto;
    font-weight: 600;
    white-space: nowrap;
    text-align: right;
}

.booking-entry-single .payment-row--discount .payment-row__amount {
    color: #007017;
}

.booking-entry-single .payment-row--total {
    margin-top: 4px;
    padding-top: 14px;
    border-bottom: 0;
    border-top: 2px solid #c3c4c7;
    font-size: 18px;
}

.booking-entry-single .payment-row--total .payment-row__label,
.booking-entry-single .payment-row--total .payment-row__amount {

    font-weight: 700;
}

.booking-entry-single .payment-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    max-width: 460px;
}

.booking-entry-single .payment-section-content {
    padding-top: 18px;
}

.booking-entry-single .payment-method,
.booking-entry-single .stripe-info {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 15px;
    line-height: 1.5;
}

.booking-entry-single .stripe-info code {
    display: block;
    margin-top: 4px;
    padding: 6px 8px;
    background: #f6f7f7;
    border-radius: 3px;
    font-size: 13px;
    word-break: break-all;
}

.booking-entry-single .addons-table {
    width: 100%;
    border-collapse: collapse;
}

.booking-entry-single .addons-table th,
.booking-entry-single .addons-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #f0f0f1;
}

.booking-entry-single .add-note-form {
    margin-bottom: 16px;
}

.booking-entry-single .add-note-form textarea {
    width: 100%;
    margin-bottom: 8px;
}

.booking-entry-single .add-note-form .button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.booking-entry-single .notes-list {
    max-height: 400px;
    overflow-y: auto;
}

.booking-entry-single .note-item {
    padding: 12px;
    margin-bottom: 8px;
    background: #f6f7f7;
    border-radius: 6px;
}

.booking-entry-single .note-content {
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.5;
    color: #1d2327;
}

.booking-entry-single .note-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #646970;
}

.booking-entry-single .no-notes {
    font-style: italic;
    margin: 0;
    padding: 12px 0;
}

.booking-entry-single .sidebar-card {
    padding: 16px 20px 20px;
    margin: 0 0 20px;
}

.booking-entry-single .sidebar-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e4e7;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
}

.booking-entry-single .status-select {
    width: 100%;
    margin-bottom: 8px;
}

.booking-entry-single .status-select.status-enquiry {
    background: #f0f6fc;
    border-color: #135e96;
}

.booking-entry-single .status-select.status-completed {
    background: #edfaef;
    border-color: #007017;
}

.booking-entry-single .status-select.status-pending {
    background: #fcf9e8;
    border-color: #996800;
}

.booking-entry-single .status-select.status-failed {
    background: #fcf0f1;
    border-color: #b32d2e;
}

.booking-entry-single .status-select.status-cancelled {
    background: #f0f0f1;
    border-color: #50575e;
}

.booking-entry-single .button-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.booking-entry-single .meta-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.booking-entry-single .meta-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.booking-entry-single .meta-item span {
    font-size: 15px;
    line-height: 1.45;
    color: #1d2327;
    word-break: break-word;
}

@media (max-width: 960px) {
    .booking-entry-single .info-grid--booking {
        grid-template-columns: 1fr;
    }

    .booking-entry-single .payment-block,
    .booking-entry-single .payment-meta {
        max-width: 100%;
    }
}

@media (max-width: 1200px) {
    .booking-entry-single .entry-content-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 782px) {
    .booking-entry-single .entry-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
