@font-face {
    font-family: 'Doran';
    src: url('uploads/DoranFaNum-Bold.woff') format('woff');
    src: url('uploads/DoranFaNum-Bold.woff2') format('woff2');
}
  
  .selector {
    font-family: 'نام-فونت', سایر-فونت‌ها, sans-serif;
  }
/* استایل‌های عمومی */
body {
    font-family: 'Doran', sans-serif;
    background-color: #bbbdb7;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* جلوگیری از اسکرول افقی در کل صفحه */
}

/* استایل‌های index.php */
.header {
    background-color: #5b5c5a;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto;
}

.cafe-name {
    font-size: 24px;
    margin: 10px 0;
    color: #FFFFFF;
}

.search-box {
    margin: 20px 0;
    width: 100%; /* برای اطمینان از تمام‌عرض بودن */
    box-sizing: border-box;
}

.search-box input {
    padding: 10px;
    width: 300px;
    max-width: 100%; /* جلوگیری از بیرون زدن */
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: 'Doran', sans-serif;
    box-sizing: border-box; /* برای محاسبه درست عرض */
}

.content {
    flex: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box; /* برای اطمینان از محاسبه درست عرض */
}

.category {
    display: block;
    background-color: #000; /* رنگ پیش‌فرض */
    color: #fff;
    padding: 20px;
    margin-bottom: 10px;
    cursor: pointer;
    text-align: center;
    border-radius: 10px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.category:hover {
    transform: translateY(-3px);
}

.menu {
    display: none;
    padding: 10px 20px;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.menu-item.unavailable {
    opacity: 0.5;
}

.menu-item.unavailable .item-name::after {
    content: " (ناموجود)";
    color: red;
    font-size: 14px;
}

.item-details {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-size: 18px;
    cursor: pointer;
    color: #000;
}

.item-description {
    font-size: 14px;
    color: #666;
}

.item-price {
    font-size: 16px;
    color: #000;
}

.item-price .original-price {
    text-decoration: line-through;
    color: red;
    margin-left: 5px;
}

.item-price .discounted-price {
    color: green;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background-color: #fff;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
}

.modal img {
    max-width: 100%;
    max-height: 70vh;
}

.close-modal-btn {
    background-color: #e74c3c;
    color: #fff;
    padding: 8px 12px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    transition: background-color 0.3s, transform 0.2s;
}

.close-modal-btn:hover {
    background-color: #c0392b;
    transform: scale(1.1);
}

.footer {
    background-color: #5b5c5a;
    color: #fff;
    padding: 20px;
    text-align: center;
}

.footer a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-section {
    margin: 10px 0;
}

.social-links a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    font-size: 20px; /* اندازه آیکون‌ها */
    transition: color 0.6s;
}

.social-links a:hover {
    color: #ddd; /* تغییر رنگ هنگام hover */
}

/* استایل‌های پنل مدیریت */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #3f403f;
    color: #ecf0f1;
    padding: 20px;
    position: fixed;
    height: 100%;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar h2 {
    margin: 0 0 30px;
    font-size: 24px;
    text-align: center;
    border-bottom: 1px solid #34495e;
    padding-bottom: 10px;
}

.sidebar a {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.sidebar a:hover {
    background-color: #34495e;
}

.main-content {
    margin-right: 270px;
    padding: 40px;
    flex: 1;
    background-color: #fff;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.main-content h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
}

.main-content h2 {
    color: #34495e;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 22px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
    text-align: right;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Doran', sans-serif;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #2c3e50;
    outline: none;
}

.form-group textarea {
    height: 120px;
}

button {
    background-color: #2c3e50;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.2s;
    display: block;
    margin: 20px auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

button:hover {
    background-color: #34495e;
    transform: translateY(-2px);
}

table {
    width: 100%;
    max-width: 800px;
    border-collapse: collapse;
    margin: 20px auto;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

table th, table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: center;
}

table th {
    background-color: #2c3e50;
    color: #fff;
    font-weight: bold;
}

table td a {
    margin: 0 5px;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
}

table td a.edit-btn {
    background-color: #2ecc71;
    color: #fff;
}

table td a.edit-btn:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
}

table td a.delete-btn {
    background-color: #e74c3c;
    color: #fff;
}

table td a.delete-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.error {
    color: #e74c3c;
    text-align: center;
    margin-bottom: 20px;
}

.success {
    color: #2ecc71;
    text-align: center;
    margin-bottom: 20px;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.login-container h2 {
    color: #2c3e50;
    margin-bottom: 30px;
}

.admin-footer {
    background-color: #3f403f;
    color: #ecf0f1;
    text-align: center;
    padding: 15px;
    margin-top: auto;
}

/* استایل وضعیت رستوران */
.status {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

.status-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 8px;
    display: inline-block;
}

.status-light.open {
    background-color: #2ecc71; /* سبز برای باز */
    animation: blink 1s infinite; /* چشمک زدن */
}

.status-light.closed {
    background-color: #c0392b; /* قرمز برای بسته */
    animation: blink 1s infinite; /* چشمک زدن *//
}

.status-text {
    font-size: 16px;
    color: #ffffff;
}

.status-text.closed {
    font-weight: bold; /* فونت بولد برای حالت بسته */
    background-color: #c0392b;
    color: #ffffff;
}

/* انیمیشن چشمک زدن */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* استایل بخش تغییر وضعیت در داشبورد */
.status-toggle {
    text-align: center;
    margin-bottom: 30px;
}

.status-toggle p {
    font-size: 18px;
    margin-bottom: 15px;
}

.status-toggle .open {
    color: #2ecc71;
    font-weight: bold;
}

.status-toggle .closed {
    color: #e74c3c;
    font-weight: bold;
}

.status-toggle button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.status-toggle .open-btn {
    background-color: #2ecc71;
    color: #fff;
}

.status-toggle .close-btn {
    background-color: #e74c3c;
    color: #fff;
}

.status-toggle button:hover {
    transform: translateY(-2px);
}

.status-toggle .open-btn:hover {
    background-color: #27ae60;
}

.status-toggle .close-btn:hover {
    background-color: #c0392b;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 10px;
    }

    .main-content {
        margin-right: 0;
        padding: 20px;
        max-width: 100%;
    }

    .form-group {
        max-width: 100%;
    }

    .login-container {
        max-width: 90%;
        margin: 50px auto;
    }

    table {
        font-size: 14px;
    }

    .search-box {
        padding: 0 10px; /* تنظیم padding برای جلوگیری از بیرون زدن */
    }

    .search-box input {
        width: 100%; /* عرض کامل در موبایل */
        max-width: 100%;
        padding: 8px; /* کاهش padding در موبایل */
    }

    .content {
        padding: 10px; /* کاهش padding در موبایل */
    }

    .category {
        font-size: 18px;
        padding: 15px;
        margin-left: 0; /* حذف margin اضافی */
        margin-right: 0;
        width: 100%; /* اطمینان از تمام‌عرض بودن */
        box-sizing: border-box;
    }
    
        .status-text {
        font-size: 14px;
    }

    .status-light {
        width: 10px;
        height: 10px;
        margin-left: 6px;
    }
}