/* Restaurant Order System - Frontend Styles */

/* Menü Widget */
.ros-menu-widget {
    padding: 20px 0;
}

.ros-category-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.ros-filter-btn {
    padding: 10px 20px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.ros-filter-btn:hover,
.ros-filter-btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.ros-menu-container {
    margin-top: 20px;
}

.ros-menu-category {
    margin-bottom: 40px;
}

.ros-category-title {
    font-size: 28px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #007bff;
}

.ros-menu-items {
    display: grid;
    gap: 20px;
}

.ros-layout-grid .ros-menu-items {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.ros-layout-grid[data-columns="2"] .ros-menu-items {
    grid-template-columns: repeat(2, 1fr);
}

.ros-layout-grid[data-columns="3"] .ros-menu-items {
    grid-template-columns: repeat(3, 1fr);
}

.ros-layout-grid[data-columns="4"] .ros-menu-items {
    grid-template-columns: repeat(4, 1fr);
}

.ros-layout-list .ros-menu-items {
    grid-template-columns: 1fr;
}

.ros-menu-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ros-menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.ros-menu-item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.ros-menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ros-menu-item:hover .ros-menu-item-image img {
    transform: scale(1.1);
}

.ros-menu-item-content {
    padding: 20px;
}

.ros-menu-item-title {
    font-size: 20px;
    margin: 0 0 10px 0;
    color: #333;
}

.ros-menu-item-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.ros-menu-item-ingredients {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.ros-menu-item-ingredients .ros-ingredients-label {
    font-size: 13px;
    color: #555;
    display: block;
    line-height: 1.5;
}

.ros-menu-item-ingredients strong {
    color: #007bff;
    margin-right: 5px;
}

.ros-menu-item-ingredients .ros-ingredients-more {
    color: #007bff;
    font-style: italic;
}

.ros-menu-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ros-menu-item-price {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

.ros-add-to-cart {
    padding: 10px 20px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.ros-add-to-cart:hover {
    background: #218838;
}

.ros-not-available {
    color: #dc3545;
    font-weight: 500;
}

/* Sepet Özeti */
.ros-cart-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 3px solid #007bff;
    padding: 15px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Mobil Toggle Başlığı */
.ros-cart-summary-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 5px 0;
    user-select: none;
}

.ros-cart-summary-toggle strong {
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ros-cart-summary-toggle .toggle-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
    color: #007bff;
}

/* Minimize edildiğinde ok yukarı */
.ros-cart-summary:not(.ros-cart-minimized) .toggle-icon {
    transform: rotate(180deg);
}

/* Desktop'ta başlık gizle, toggle gösterme */
.ros-cart-title-desktop {
    display: block;
    margin: 0 0 15px 0;
    font-size: 18px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

/* Sepet İçeriği */
.ros-cart-content {
    display: block;
    margin-top: 15px;
}

.ros-cart-summary.ros-cart-minimized .ros-cart-content {
    display: none;
}

.ros-cart-summary:not(.ros-cart-minimized) .ros-cart-content {
    display: block;
}

.ros-cart-badge {
    display: inline-block;
    background: #dc3545;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

.ros-total-amount-mini {
    font-weight: bold;
    color: #007bff;
    font-size: 16px;
}

/* Sipariş Butonları */
.ros-cart-actions {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ros-checkout-button,
.ros-whatsapp-order-button {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ros-checkout-button {
    background-color: #28a745;
    color: white;
}

.ros-checkout-button:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.ros-whatsapp-order-button {
    background-color: #25D366;
    color: white;
}

.ros-whatsapp-order-button:hover {
    background-color: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.ros-whatsapp-order-button svg {
    flex-shrink: 0;
}

.ros-cart-content {
    display: block;
}

.ros-cart-summary-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
}

.ros-cart-summary-toggle .toggle-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.ros-cart-summary:not(.ros-cart-minimized) .toggle-icon {
    transform: rotate(180deg);
}

.ros-total-amount-mini {
    font-weight: bold;
    color: #007bff;
    margin-right: 10px;
}

.ros-checkout-btn {
    width: 100%;
    padding: 14px;
    background: #007bff !important;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.3s ease;
}

.ros-checkout-btn:hover {
    background: #0056b3 !important;
}

.ros-cart-summary h4,
.ros-cart-summary-toggle strong {
    margin: 0 0 15px 0;
    font-size: 18px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.ros-cart-items {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.ros-cart-item {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ros-cart-item-info {
    flex: 1;
}

.ros-cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.ros-cart-item-ingredients {
    margin: 8px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.6;
    color: #555;
}

.ros-cart-item-quantity {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.ros-cart-item-quantity button {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.ros-cart-item-quantity button:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.ros-cart-item-price-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.ros-cart-item-price {
    font-weight: 600;
    color: #007bff;
    font-size: 16px;
}

.ros-cart-item-remove {
    color: #dc3545;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: color 0.3s ease;
}

.ros-cart-item-remove:hover {
    color: #bd2130;
}

.ros-cart-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #007bff;
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
}

/* Sipariş Formu */
.ros-order-form-widget {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 30px auto;
}

.ros-form-title {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}

.ros-cart-summary-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.ros-cart-summary-box h4 {
    margin: 0 0 15px 0;
}

.ros-cart-items-list {
    margin-bottom: 15px;
}

.ros-cart-totals {
    border-top: 2px solid #dee2e6;
    padding-top: 15px;
}

.ros-cart-totals > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ros-total {
    font-size: 20px;
    font-weight: bold;
    color: #007bff;
}

.ros-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.ros-form-group {
    margin-bottom: 20px;
}

.ros-form-group.ros-address-field {
    overflow: hidden;
    transition: all 0.3s ease;
}

.ros-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.ros-form-group input[type="text"],
.ros-form-group input[type="tel"],
.ros-form-group input[type="email"],
.ros-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.ros-form-group input:focus,
.ros-form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.ros-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ros-radio-group label {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.ros-radio-group label:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.ros-radio-group input[type="radio"]:checked + label,
.ros-radio-group label:has(input[type="radio"]:checked) {
    border-color: #007bff;
    background: #e7f3ff;
}

.ros-radio-group input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.ros-submit-order {
    width: 100%;
    padding: 15px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.ros-submit-order:hover {
    background: #0056b3;
}

.ros-form-messages {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.ros-form-messages.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.ros-form-messages.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Malzeme Seçimi Modal */
.ros-ingredients-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
}

.ros-ingredients-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ros-modal-close-x {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.ros-modal-close-x:hover {
    color: #333;
}

.ros-ingredients-modal h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 22px;
}

.ros-ingredients-list {
    margin: 20px 0;
}

.ros-ingredient-option {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ros-ingredient-option:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.ros-ingredient-option label {
    display: flex;
    align-items: center;
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.ros-ingredient-option input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.ros-ingredient-option label span {
    font-size: 15px;
    color: #333;
}

.ros-ingredient-price {
    color: #28a745;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    margin-left: 10px;
}

.ros-modal-actions {
    margin-top: 25px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.ros-modal-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.ros-modal-confirm {
    background: #28a745;
    color: #fff;
}

.ros-modal-confirm:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.ros-modal-cancel {
    background: #6c757d;
    color: #fff;
}

.ros-modal-cancel:hover {
    background: #5a6268;
}

/* Toast Notification */
.ros-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.ros-toast.ros-toast-show {
    transform: translateX(0);
    opacity: 1;
}

.ros-toast-success {
    background: #28a745;
    color: #fff;
}

.ros-toast-error {
    background: #dc3545;
    color: #fff;
}

.ros-toast-icon {
    font-size: 20px;
    font-weight: bold;
}

.ros-toast-message {
    font-size: 14px;
}

/* Desktop Styles */
@media (min-width: 769px) {
    .ros-cart-summary {
        position: fixed;
        bottom: 20px;
        right: 20px;
        left: auto;
        max-width: 400px;
        border-radius: 12px;
        border: 2px solid #007bff;
        border-top: 2px solid #007bff;
    }
    
    /* Desktop'ta toggle başlığını gizle */
    .ros-cart-summary-toggle {
        display: none !important;
    }
    
    /* Desktop'ta içerik her zaman görünsün */
    .ros-cart-summary .ros-cart-content {
        display: block !important;
        margin-top: 0;
    }
    
    .ros-cart-summary.ros-cart-minimized .ros-cart-content {
        display: block !important;
    }
    
    .ros-cart-title-desktop {
        display: block !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ros-layout-grid[data-columns="3"] .ros-menu-items,
    .ros-layout-grid[data-columns="4"] .ros-menu-items {
        grid-template-columns: 1fr;
    }
    
    .ros-form-row {
        grid-template-columns: 1fr;
    }
    
    .ros-cart-summary {
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 12px 12px 0 0;
        max-width: 100%;
        padding: 12px 15px;
    }
    
    /* Mobilde desktop başlığını gizle */
    .ros-cart-title-desktop {
        display: none !important;
    }
    
    /* Mobilde toggle başlığını göster */
    .ros-cart-summary-toggle {
        display: flex !important;
    }
    
    /* Minimize edildiğinde sadece başlık görünsün */
    .ros-cart-summary.ros-cart-minimized {
        padding: 12px 15px;
    }
    
    .ros-cart-summary.ros-cart-minimized .ros-cart-content {
        display: none !important;
    }
    
    /* Açıldığında içerik görünsün */
    .ros-cart-summary:not(.ros-cart-minimized) .ros-cart-content {
        display: block !important;
    }
    
    .ros-cart-items {
        max-height: 35vh;
    }
    
    .ros-checkout-button,
    .ros-whatsapp-order-button {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .ros-menu-item-image {
        height: 180px;
    }
    
    .ros-menu-item-title {
        font-size: 18px;
    }
    
    .ros-menu-item-price {
        font-size: 20px;
    }
    
    .ros-category-filter {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: flex-start;
    }
    
    .ros-category-filter::-webkit-scrollbar {
        display: none;
    }
    
    .ros-filter-btn {
        flex-shrink: 0;
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .ros-ingredients-modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    body.ros-cart-open {
        overflow: hidden;
    }
    
    .ros-cart-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    body.ros-cart-open .ros-cart-overlay {
        display: block;
    }
    
    .ros-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }
    
    .ros-toast.ros-toast-show {
        transform: translateY(0);
    }
}
