/* === БАЗОВЫЕ СТИЛИ И СОЗДАНИЕ РЕЦЕПТА (НЕ ТРОНУТО) === */
.nav-pills .nav-link.active.orange-tab { background-color: #ff6b00 !important; color: #fff !important; }
.recipe-header-card { background: #fff; border-radius: 16px; border: 1px solid #eee; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
body { background: #f4f7f6; font-size: 13px; padding-bottom: 120px; font-family: -apple-system, sans-serif; }
.table-container { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.table thead { background: #2d3436; color: #fff; }
.table th, .table td { padding: 6px 8px; vertical-align: middle; border-color: #eee; }
.input-compact { border: 1px solid #ddd; border-radius: 4px; padding: 3px; width: 100%; text-align: center; font-size: 13px; }
.total-panel { position: fixed; bottom: 0; left: 0; right: 0; background: #2d3436; color: #fff; padding: 15px; z-index: 1000; }
.sub-recipe-block { background: #fff7ed; border: 2px solid #ff6b00; border-radius: 12px; margin: 20px 0; padding: 10px; position: relative; }
.sub-block-header { position: absolute; top: -12px; left: 15px; background: #ff6b00; color: #fff; font-size: 11px; padding: 2px 10px; border-radius: 6px; font-weight: bold; box-shadow: 0 2px 5px rgba(255,107,0,0.3); }
.btn-add-sub { background: #ffedd5; color: #9a3412; border: 1px dashed #fdba74; width: 100%; padding: 4px; font-size: 11px; border-radius: 6px; font-weight: bold; margin-top: 5px; }
.row-total { font-weight: bold; color: #ff6b00; }

/* === НОВАЯ КАРТОЧКА РЕЦЕПТА (v9.7) === */
.recipe-card-premium {
    background: #ffffff;
    border-radius: 18px;
    height: 185px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    margin-bottom: 16px;
}

.recipe-card-premium:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.recipe-gallery-v97 {
    width: 40%;
    min-width: 40%;
    background-position: center;
    background-size: cover;
    position: relative;
}

.recipe-info-v97 {
    width: 60%;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.recipe-rating-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.photo-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
}

.photo-dots .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
}

.photo-dots .dot.active {
    background: #ffffff;
}

/* === МОДАЛЬНОЕ ОКНО ИНГРЕДИЕНТОВ === */
#modalIngredientsList .modal-category-item {
    margin-bottom: 10px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    overflow: hidden;
}
#modalIngredientsList .modal-category-header {
    padding: 14px 16px !important;
    background: #f8fafc !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}
#modalIngredientsList .modal-category-body {
    display: none;
    padding: 8px !important;
    border-top: 1px solid #f1f5f9 !important;
    background: #fff !important;
}
#modalIngredientsList .modal-category-body.show { display: block; }
#modalIngredientsList .ing-item-modal {
    padding: 12px !important;
    margin-bottom: 4px !important;
    background: #fdfdfd !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 10px !important;
    display: flex; align-items: center;
}
.rotate-icon { transform: rotate(180deg); color: #ff6b00 !important; transition: transform 0.2s; }

/* === ПАРЯЩИЙ ПОИСК === */
.top-search-floating {
    position: fixed;
    top: 10px; left: 0; right: 0;
    padding: 0 15px;
    z-index: 1600;
}
.search-bar-compact {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.08) !important;
    height: 42px; border-radius: 50px; padding: 0 20px;
    font-size: 14px; width: 100%;
}

/* === КАТЕГОРИИ И КАРУСЕЛИ === */
.category-card-premium {
    background: #ffffff;
    border-radius: 20px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-card-premium:active { transform: scale(0.94); background: #f8fafc; }
.cat-icon-wrapper {
    width: 44px; height: 44px; min-width: 44px;
    border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.cat-details { display: flex; flex-direction: column; overflow: hidden; }
.cat-name { font-weight: 700; font-size: 13px; color: #334155; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; }
.cat-count { font-size: 10px; font-weight: 500; color: #94a3b8; margin-top: 2px; }
.cat-count-v99 { font-size: 11px; font-weight: 600; color: #ff6b00; margin-top: 4px; display: block; }
.cat-count-v100 { font-size: 11px; font-weight: 600; color: #ff6b00; margin-top: 4px; display: block; transition: all 0.3s ease; }

/* === КНОПКИ-СТЕКЛА === */
.cat-btn-glass, .cat-btn-glass-light {
    padding: 10px 22px !important;
    background: rgba(45, 52, 54, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    color: #ffffff !important;
    border-radius: 50px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    margin-right: 10px !important;
    display: inline-block !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

/* === АНИМАЦИИ === */
@keyframes arrowShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes arrowShakeVertical {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-5px); }
    75% { transform: translateY(5px); }
}

.toggle-cat-btn {
    position: fixed; left: 20px; bottom: 100px;
    width: 44px; height: 44px; z-index: 2600;
    background: #fff; border: 2px solid #ff6b00;
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: arrowShake 2s infinite ease-in-out;
}
.toggle-cat-btn.active { transform: rotate(180deg); animation: none; left: 10px; }

.category-wrapper {
    position: fixed;
    bottom: 155px;
    left: -100%;
    width: auto;
    max-width: calc(100% - 20px);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 12px;
    z-index: 2500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.4);
    margin-left: 10px;
    overflow: hidden;
}
.category-wrapper.active { left: 0; }

.cat-grid-v103 {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 4px;
}
.cat-grid-v103::-webkit-scrollbar { display: none; }

.cat-btn-glass-v103 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 5px;
    background: rgba(45, 52, 54, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
    text-decoration: none;
    color: #2d3436;
    transition: all 0.2s;
}
.cat-btn-glass-v103:active { transform: scale(0.95); background: rgba(255, 107, 0, 0.1); }
.cat-btn-glass-v103 .icon { font-size: 22px; margin-bottom: 5px; }
.cat-btn-glass-v103 .label { font-size: 10px; font-weight: 700; text-align: center; line-height: 1.1; }

/* AI Assistant Styles */
.ai-trigger-btn {
    position: fixed; right: 15px; bottom: 85px;
    width: 54px; height: 54px; z-index: 2600;
    background: linear-gradient(135deg, #ff6b00, #ff9e00);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(255,107,0,0.4);
    border: 2px solid #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ai-trigger-btn:active { transform: scale(0.9); }

.ai-chat-panel {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: #fff; z-index: 3000;
    display: none; flex-direction: column;
    animation: slideUp 0.3s ease-out;
}
.ai-chat-panel.active { display: flex; }

.ai-chat-header {
    padding: 20px; border-bottom: 1px solid #eee;
    display: flex; align-items: center; justify-content: space-between;
    background: #fff;
}
.ai-chat-messages {
    flex-grow: 1; overflow-y: auto; padding: 20px;
    display: flex; flex-direction: column; gap: 15px;
    background: #f8fafc;
}
.message { max-width: 85%; padding: 12px 16px; border-radius: 18px; font-size: 14px; line-height: 1.4; }
.message.user { align-self: flex-end; background: #ff6b00; color: #fff; border-bottom-right-radius: 4px; }
.message.ai { align-self: flex-start; background: #fff; color: #2d3436; border-bottom-left-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

.ai-chat-input-area {
    padding: 15px; border-top: 1px solid #eee;
    display: flex; gap: 10px; background: #fff;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.toggle-cat-btn-top {
    display: inline-flex;
    width: 44px; height: 44px;
    background: #fff; border: 2px solid #ff6b00;
    border-radius: 12px; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: arrowShake 2s infinite ease-in-out;
}
.toggle-cat-btn-top.active { transform: rotate(180deg); animation: none; }

/* Глобальные теги - обновленный стиль */
.global-tag-chip {
    white-space: nowrap;
    padding: 8px 18px;
    border-radius: 50px;
    background: #2d3436;
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.global-tag-chip.active {
    background: #ff6b00;
    color: #fff;
}

/* АДАПТИВ ДЛЯ МОБИЛЬНЫХ */
@media (max-width: 480px) {
    .table th, .table td { font-size: 12px; padding: 4px 2px; }
    .input-compact { font-size: 12px; padding: 2px 0; }
    .table td:nth-child(2), .table th:nth-child(2), .table td:nth-child(3), .table th:nth-child(3) { width: 60px; min-width: 60px; }
}

/* UPDATE 7.3: PUBLISH BLOCK */
.publish-row { padding: 12px 15px; background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 12px; display: flex; align-items: center; }
.publish-checkbox { width: 24px; height: 24px; margin-right: 12px; cursor: pointer; }
.publish-label { font-size: 15px; font-weight: 700; color: #2d3436; cursor: pointer; flex-grow: 1; }

/* Comment Highlighting */
.highlight-comment {
    background-color: #fff3e0 !important;
    border: 1px solid #ff6b00 !important;
    transition: all 0.5s ease;
}

/* Premium Blur Overlay */
.premium-content-wrapper {
    position: relative;
    overflow: hidden;
}

.content-blur {
    filter: blur(8px) grayscale(0.5);
    pointer-events: none;
    user-select: none;
    opacity: 0.6;
}

.premium-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 16px;
    backdrop-filter: blur(2px);
    text-align: center;
    padding: 20px;
}

.lock-icon-wrapper {
    width: 60px;
    height: 60px;
    background: #ff6b00;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(255,107,0,0.3);
}
