/* فایل CSS برای پلاگین رزرواسیون کلبه */

.cabin-reservation-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Vazir', 'Tahoma', Arial, sans-serif;
    direction: rtl;
}

/* اطلاعات کلبه */
.cabin-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.cabin-info h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 24px;
}

.pricing-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.pricing-info p {
    margin: 8px 0;
    padding: 10px;
    background: white;
    border-radius: 5px;
    border-right: 4px solid #007cba;
}

/* تقویم فارسی */
.persian-calendar-container {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.persian-calendar {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.persian-calendar .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #007cba;
    color: white;
    border-radius: 5px;
    margin-bottom: 20px;
}

.persian-calendar .calendar-nav {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.persian-calendar .calendar-nav:hover {
    background: rgba(255,255,255,0.2);
}

.persian-calendar .calendar-title {
    font-size: 18px;
    font-weight: bold;
}

.persian-calendar .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.persian-calendar .calendar-day-header {
    background: #6c757d;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

.persian-calendar .calendar-day {
    background: white;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s;
}

.persian-calendar .calendar-day:hover {
    background: #e3f2fd;
}

.persian-calendar .calendar-day.other-month {
    color: #adb5bd;
    background: #f8f9fa;
}

.persian-calendar .calendar-day.today {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.persian-calendar .calendar-day.holiday {
    background: #f8d7da;
    color: #721c24;
}

.persian-calendar .calendar-day.reserved {
    background: #dc3545;
    color: white;
    cursor: not-allowed;
}

.persian-calendar .calendar-day.selected {
    background: #007cba;
    color: white;
}

.persian-calendar .calendar-day.range-start,
.persian-calendar .calendar-day.range-end {
    background: #28a745;
    color: white;
}

.persian-calendar .calendar-day.in-range {
    background: #d4edda;
    color: #155724;
}

/* فرم رزرو */
.reservation-form-container {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cabin-reservation-form h4 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.25);
}

.form-group input[readonly] {
    background: #f8f9fa;
    cursor: not-allowed;
}

/* محاسبه قیمت */
.price-calculation {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
}

.price-calculation h5 {
    margin-top: 0;
    color: #495057;
}

#price-breakdown {
    margin-bottom: 15px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

.price-item:last-child {
    border-bottom: none;
}

.total-price {
    background: #007cba;
    color: white;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-size: 18px;
    margin-top: 10px;
}

/* دکمه‌های عملیات */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-reserve,
.btn-cancel {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.btn-reserve {
    background: #28a745;
    color: white;
}

.btn-reserve:hover {
    background: #218838;
}

.btn-reserve:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-cancel {
    background: #dc3545;
    color: white;
}

.btn-cancel:hover {
    background: #c82333;
}

/* حالت‌های وضعیت */
.status-pending {
    color: #856404;
    background: #fff3cd;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-confirmed {
    color: #155724;
    background: #d4edda;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-cancelled {
    color: #721c24;
    background: #f8d7da;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
}

/* لودینگ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* پیام‌های اطلاع‌رسانی */
.cabin-message {
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    font-weight: bold;
}

.cabin-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cabin-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cabin-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.cabin-message.info {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

/* راهنمای تقویم */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
}

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

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.legend-available { background: white; }
.legend-holiday { background: #f8d7da; }
.legend-reserved { background: #dc3545; }
.legend-selected { background: #007cba; }

/* ریسپانسیو */
@media (max-width: 768px) {
    .cabin-reservation-container {
        padding: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pricing-info {
        grid-template-columns: 1fr;
    }
    
    .persian-calendar .calendar-header {
        padding: 10px;
    }
    
    .persian-calendar .calendar-title {
        font-size: 16px;
    }
    
    .persian-calendar .calendar-day {
        padding: 8px;
        min-height: 35px;
        font-size: 14px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .calendar-legend {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .cabin-reservation-container {
        padding: 10px;
    }
    
    .cabin-info,
    .persian-calendar-container,
    .reservation-form-container {
        padding: 15px;
    }
    
    .persian-calendar .calendar-day {
        padding: 5px;
        min-height: 30px;
        font-size: 12px;
    }
    
    .persian-calendar .calendar-day-header {
        padding: 8px;
        font-size: 12px;
    }
}

/* انیمیشن‌ها */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* تولتیپ */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* استایل‌های ادمین */
.cabin-admin-container {
    background: white;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    margin: 20px 0;
}

.cabin-admin-container .inside {
    margin: 0;
    padding: 0;
}

.cabin-form-container {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    padding: 20px;
    margin-bottom: 20px;
}

.cabins-list table {
    margin-top: 20px;
}

.shortcode-display {
    background: #f1f1f1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
    display: inline-block;
    margin-left: 10px;
}

/* فونت فارسی */
@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Regular.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* پرینت */
@media print {
    .form-actions,
    .btn-reserve,
    .btn-cancel {
        display: none;
    }
    
    .cabin-reservation-container {
        box-shadow: none;
        border: none;
    }
}