/**
 * Restaurant System Frontend Styles
 */

/* Menu Grid */
.rs-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.rs-menu-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.rs-menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.rs-menu-item-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.rs-menu-item-content {
    padding: 20px;
}

.rs-menu-item-title {
    margin: 0 0 10px;
    font-size: 20px;
}

.rs-menu-item-title a {
    color: #333;
    text-decoration: none;
}

.rs-menu-item-price {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 10px;
}

.rs-menu-item-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.rs-menu-item-actions {
    display: flex;
    gap: 10px;
}

.rs-menu-item-actions .button {
    flex: 1;
    text-align: center;
}

/* Call Waiter Widget */
.rs-call-waiter-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rs-call-waiter-btn {
    width: 100%;
    padding: 15px 20px !important;
    font-size: 18px !important;
    background: #e74c3c !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: background 0.3s;
}

.rs-call-waiter-btn:hover {
    background: #c0392b !important;
}

.rs-call-waiter-btn .dashicons {
    margin-right: 8px;
}

/* Modal */
.rs-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
}

.rs-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.rs-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.rs-modal-close:hover {
    color: #000;
}

/* Reservation Form */
.rs-reservation-form-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.rs-form-row {
    margin-bottom: 20px;
}

.rs-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.rs-form-row input,
.rs-form-row select,
.rs-form-row textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.rs-form-row input:focus,
.rs-form-row select:focus,
.rs-form-row textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Available Tables */
.rs-available-tables {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rs-tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.rs-table-option {
    padding: 15px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.rs-table-option:hover {
    border-color: #3498db;
    transform: scale(1.05);
}

.rs-table-option.selected {
    border-color: #2ecc71;
    background: #d5f4e6;
}

.rs-table-number {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.rs-table-capacity {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.rs-select-table {
    width: 100%;
}

/* Table Map */
.rs-table-map-container {
    margin: 30px 0;
}

.rs-table-map {
    position: relative;
    min-height: 600px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 8px;
}

.rs-table-marker {
    position: absolute;
    width: 80px;
    height: 80px;
    background: #fff;
    border: 2px solid #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.rs-table-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.rs-table-marker.occupied {
    background: #e74c3c;
    color: #fff;
}

.rs-table-marker.reserved {
    background: #f39c12;
    color: #fff;
}

.rs-table-map-legend {
    margin-top: 20px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.rs-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rs-legend-available,
.rs-legend-occupied,
.rs-legend-reserved {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #333;
}

.rs-legend-available {
    background: #fff;
}

.rs-legend-occupied {
    background: #e74c3c;
}

.rs-legend-reserved {
    background: #f39c12;
}

/* Messages */
.rs-message {
    margin-top: 20px;
}

.rs-success {
    padding: 15px;
    background: #d5f4e6;
    color: #27ae60;
    border-radius: 4px;
    border-left: 4px solid #27ae60;
}

.rs-error {
    padding: 15px;
    background: #fadbd8;
    color: #e74c3c;
    border-radius: 4px;
    border-left: 4px solid #e74c3c;
}

.rs-loading {
    padding: 15px;
    background: #d6eaf8;
    color: #3498db;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

/* External Orders */
.rs-external-orders {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rs-external-label {
    font-weight: 600;
    margin-bottom: 10px;
}

.rs-external-order-btn {
    margin-right: 10px;
    margin-bottom: 10px;
    background: #3498db !important;
    color: #fff !important;
}

.rs-external-order-btn:hover {
    background: #2980b9 !important;
}

/* Thank You Page */
.rs-thankyou-message {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.rs-table-info {
    font-size: 24px;
    margin: 20px 0;
}

.rs-order-actions {
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .rs-menu-grid {
        grid-template-columns: 1fr;
    }
    
    .rs-tables-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .rs-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}