/* TABLOC Frontend Styles */
.tabloc-booking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.tabloc-booking-steps {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.tabloc-booking-steps .step {
    flex: 1;
    text-align: center;
    padding: 10px;
    color: #666;
    position: relative;
    cursor: default;
}

.tabloc-booking-steps .step.active {
    color: #0073aa;
    font-weight: bold;
}

.tabloc-booking-steps .step.active:after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #0073aa;
}

/* Events Grid */
.tabloc-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.tabloc-event-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.tabloc-event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tabloc-event-card h3 {
    margin-top: 0;
    color: #0073aa;
}

.tabloc-event-card p {
    margin: 8px 0;
}

.tabloc-event-card .button {
    margin-top: 15px;
}

/* Seating Plan */
#tabloc-seating-plan {
    margin: 30px 0;
}

.tabloc-section-plan {
    margin-bottom: 40px;
}

.tabloc-section-header {
    background: #0073aa;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.tabloc-tables-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.tabloc-table {
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    min-width: 150px;
}

.tabloc-table.available {
    border-color: #5cb85c;
    background: #f9fff9;
}

.tabloc-table.partial {
    border-color: #f0ad4e;
    background: #fffbf0;
}

.tabloc-table.booked {
    border-color: #d9534f;
    background: #fff5f5;
    opacity: 0.6;
}

.tabloc-table-header {
    margin-bottom: 10px;
    font-weight: bold;
}

.tabloc-chairs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.tabloc-chair {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

.tabloc-chair.available {
    background: #5cb85c;
    color: white;
    border-color: #4cae4c;
}

.tabloc-chair.selected {
    background: #0073aa;
    color: white;
    border-color: #005a87;
}

.tabloc-chair.booked {
    background: #d9534f;
    color: white;
    border-color: #d43f3a;
    cursor: not-allowed;
}

.tabloc-table-book-btn {
    margin-top: 10px;
}

/* Forms */
.tabloc-form-group {
    margin-bottom: 20px;
}

.tabloc-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.tabloc-form-group input,
.tabloc-form-group textarea,
.tabloc-form-group select {
    width: 100%;
    max-width: 500px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.tabloc-booking-summary,
.tabloc-selection-summary,
.tabloc-final-summary {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

/* Payment */
.payment-method {
    margin-bottom: 15px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.payment-method:hover {
    border-color: #0073aa;
}

.payment-method input[type="radio"] {
    margin-right: 10px;
}

#stripe-card-element {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 20px 0;
}

#stripe-card-errors {
    color: #d9534f;
    margin: 10px 0;
}

#tabloc-bank-details {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

/* Loading */
.tabloc-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Success/Error Messages */
.tabloc-success {
    background: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.tabloc-error {
    background: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

/* Modal Styles */
.tabloc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.tabloc-modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

#modal-chairs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.modal-chair {
    width: 50px;
    height: 50px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.modal-chair.available {
    background: #f8f9fa;
    border-color: #6c757d;
}

.modal-chair.selected {
    background: #0073aa;
    color: white;
    border-color: #005a87;
}

.modal-chair.booked {
    background: #dc3545;
    color: white;
    border-color: #bd2130;
    cursor: not-allowed;
    opacity: 0.6;
}

.modal-instruction {
    text-align: center;
    color: #666;
    font-style: italic;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Enhanced frontend styles */
.tabloc-booking-steps {
    display: flex;
    margin: 40px 0;
    counter-reset: step;
}

.tabloc-booking-steps .step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 10px;
}

.tabloc-booking-steps .step:before {
    counter-increment: step;
    content: counter(step);
    width: 40px;
    height: 40px;
    line-height: 40px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: block;
    margin: 0 auto 10px;
    background: white;
    font-weight: bold;
    color: #666;
}

.tabloc-booking-steps .step.active:before {
    border-color: #0073aa;
    background: #0073aa;
    color: white;
}

.tabloc-booking-steps .step.active .step-title {
    color: #0073aa;
    font-weight: bold;
}

.tabloc-booking-steps .step:not(:last-child):after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #ddd;
    z-index: -1;
}

.tabloc-booking-steps .step.active:after {
    background: #0073aa;
}

.step-description {
    color: #666;
    margin-bottom: 30px;
}

.event-card-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.event-details {
    flex-grow: 1;
    margin-bottom: 20px;
}

.event-details p {
    margin: 8px 0;
    display: flex;
    align-items: center;
}

.event-details .dashicons {
    margin-right: 8px;
    color: #0073aa;
}

.tabloc-legend {
    margin: 30px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.available { background: #5cb85c; }
.legend-color.selected { background: #0073aa; }
.legend-color.booked { background: #dc3545; }
.legend-color.partial { background: #ffc107; }

.selection-details, .summary-details {
    margin: 15px 0;
}

.selection-details p, .summary-details p {
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

.selection-total, .summary-total {
    font-size: 18px;
    font-weight: bold;
    color: #0073aa;
    margin: 20px 0;
}

.step-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.step-actions .button {
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-method-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.payment-method-card:hover {
    border-color: #0073aa;
}

.payment-method-header {
    padding: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    background: #f8f9fa;
}

.payment-method-header input[type="radio"] {
    margin-right: 15px;
}

.payment-method-header label {
    flex-grow: 1;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.payment-icon {
    font-size: 24px;
    margin-right: 15px;
    color: #0073aa;
}

.payment-title {
    font-size: 18px;
    font-weight: bold;
    margin-right: 10px;
}

.payment-subtitle {
    color: #666;
}

.payment-method-content {
    padding: 20px;
    border-top: 1px solid #eee;
}

.bank-details h4 {
    margin-top: 0;
    color: #333;
}

.bank-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.bank-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 10px;
    border-radius: 4px;
    color: #856404;
}

.bank-note .dashicons {
    margin-right: 8px;
}

#tabloc-booking-result {
    margin-top: 30px;
}