/* In css/recipe-cards.css */

/* Make sure canvas can show pop-out elements */
#canvas {
    overflow: visible !important;
}

/* ===========================================
    RECIPE CARD (INDIVIDUAL) STYLES
=========================================== */
.recipe-card {
    position: absolute;
    width: 304px;
    height: 432px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    user-select: none; 
    z-index: 10;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden; 
}

.recipe-card.front-card { 
    z-index: 11;
}

.recipe-card:hover:not(.dragging) { 
    transform: translateY(-2px); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}

.recipe-card.dragging { 
    cursor: grabbing !important; 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25) !important; 
    transform: scale(1.03) !important; 
    z-index: 1000 !important; 
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out; 
}

.recipe-card.expanded-host {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 1001 !important; cursor: default;
}
.recipe-card:hover .rcv-expansion-panel {
    opacity: 1; transform: translateX(0) scaleX(1); pointer-events: auto; z-index: 1000;
}
.rcv-expansion-panel { /* For individual recipe cards */
    position: absolute; top: 0; left: 100%; width: 300px; height: 100%;
    background: rgba(250, 251, 253, 0.95); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid rgba(255, 255, 255, 0.8); border-left: none;
    border-radius: 0 12px 12px 0; box-shadow: 12px 0px 35px rgba(50, 70, 100, 0.15);
    padding: 20px; z-index: -1; opacity: 0; transform: translateX(-25px) scaleX(0.9);
    transform-origin: left center; pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
}
.recipe-card.expanded-host .rcv-expansion-panel {
    opacity: 1; transform: translateX(0) scaleX(1); pointer-events: auto; z-index: 1000;
}
.rcv-expansion-panel .endpoint {
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    transform: translateY(-50%);
}
.rcv-expansion-panel .endpoint.source {
    left: -10px;
}
.rcv-expansion-panel .endpoint.target {
    right: -10px;
}
.expansion-panel-content h4 { font-size: 16px; color: #3b82f6; margin-bottom: 15px; border-bottom: 1px solid rgba(59, 130, 246, 0.2); padding-bottom: 10px; }
.expansion-panel-content p { font-size: 13px; color: #343a40; margin-bottom: 10px; }

.recipe-card .rcv-header-condensed {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 16px 16px 8px 16px;
}
.recipe-card .rcv-type-icon-condensed { display: none; } 
.recipe-card .rcv-name-condensed {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    padding: 0;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.recipe-card .rcv-name-condensed.is-untitled { 
    color: #9ca3af;
}

.card-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

.recipe-card .card-stats {
    display: flex; 
    align-items: center; 
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.recipe-card .card-stats i {
    width: 12px;
    height: 12px;
}

.recipe-card .card-flavor-pips {
    display: flex;
}

.recipe-card .flavor-pip {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.recipe-card .flavor-pip:not(:first-child) {
    margin-left: -8px;
}

.recipe-card .card-flavor-pips:hover .flavor-pip {
    transform: translateX(-4px);
}

.recipe-card .card-flavor-pips .flavor-pip:hover {
    transform: scale(1.25) translateX(0px) !important;
    z-index: 50 !important;
    position: relative;
}

.recipe-card .rcv-watermark-condensed {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 10px;
    color: #d1d5db;
    font-weight: 500;
    letter-spacing: 0.5px;
    z-index: 1000 !important;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
}

/* ===========================================
    RECIPE COLLECTION CARD STYLES
=========================================== */
.recipe-collection-card {
    width: 280px; height: 190px; padding: 20px; border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.25);
    background: rgba(50, 50, 50, 0.12);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex; flex-direction: column; position: absolute;
    cursor: grab; user-select: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease,
                left 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                top 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
    overflow: visible; 
}

.recipe-collection-card:hover:not(.jtk-dragging) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}
.recipe-collection-card.jtk-dragging {
    cursor: grabbing; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: scale(1.05) !important; z-index: 1000 !important;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
}

.recipe-collection-card.expanded-collection-host {
    transform: scale(1.03) translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.22);
    z-index: 1001 !important; cursor: default;
}

.rcc-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; z-index: 2; }
.rcc-icon { color: #3b82f6; width: 24px; height: 24px; opacity: 0.9; flex-shrink: 0; }
.rcc-name {
    font-size: 17px; font-weight: 600; color: #222;
    line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    flex-grow: 1; margin-right: 5px;
}
.rcc-count-badge {
    background-color: rgba(59, 130, 246, 0.8); color: white; font-size: 11px; font-weight: 600;
    padding: 3px 8px; border-radius: 10px; line-height: 1; flex-shrink: 0;
}
.rcc-mini-fan-preview {
    flex-grow: 1; display: flex; align-items: center; justify-content: center;
    position: relative; margin-bottom: 10px; min-height: 60px; z-index: 1;
    pointer-events: none;
}
.mini-fan-card {
    width: 70%; height: 80%; background-color: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 12px;
    position: absolute; box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transform-origin: bottom center;
}
.mini-fan-card:nth-child(1) { transform: translate(-3px, 6px) rotate(-4deg); z-index: 1;}
.mini-fan-card:nth-child(2) { transform: translate(0, 3px) rotate(0deg); z-index: 2;}
.mini-fan-card:nth-child(3) { transform: translate(3px, 0px) rotate(4deg); z-index: 3;}
.mini-fan-card:nth-child(n+4) { display: none; }

/* Styles for Right-Side Expanded List */
.collection-expanded-list-area {
    position: absolute; top: 50%; left: calc(100% + 15px);
    transform: translateY(-50%); width: 280px; max-height: 350px;
    overflow-y: auto; overflow-x: hidden; z-index: 1000; opacity: 0;
    transform: translateY(-50%) translateX(-20px) scale(0.9); 
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.1s,
                transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.recipe-collection-card.expanded-collection-host .collection-expanded-list-area {
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1); 
    pointer-events: auto;
}
.expanded-list-item {
    height: 55px; padding: 10px 15px; margin-bottom: 8px; border-radius: 14px;
    background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4); box-shadow: 0 4px 15px rgba(60, 80, 110, 0.08);
    display: flex; align-items: center; gap: 10px;
    cursor: grab;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.expanded-list-item:hover { 
    transform: translateX(8px) scale(1.03);
    box-shadow: 0 6px 20px rgba(60, 80, 110, 0.12);
}
.expanded-list-item .rcv-type-icon-condensed { display: block !important; width: 18px; height: 18px; opacity: 0.8;}
.expanded-list-item .rcv-name-condensed { font-size: 14px; font-weight: 500; flex-grow: 1; color: #111; }

/* Context Menu Styles */
.context-menu, .link-context-menu {
    position: absolute; background-color: rgba(252, 253, 255, 0.85);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(200, 210, 230, 0.4); border-radius: 14px;
    box-shadow: 0 8px 25px rgba(50, 70, 100, 0.18); padding: 10px;
    z-index: 2000; display: flex; flex-direction: column;
}
.context-menu button, .link-context-menu button {
    background: none; border: none; padding: 12px 18px; text-align: left;
    font-size: 14px; color: #212529; cursor: pointer; border-radius: 10px;
    transition: background-color 0.2s; display: flex; align-items: center; gap: 10px;
}
.context-menu button:hover, .link-context-menu button:hover { background-color: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.context-menu button:disabled { color: #adb5bd; cursor: not-allowed; background-color: transparent !important; }
.context-menu button [data-lucide], .link-context-menu button [data-lucide] { width:16px; height:16px; color: #5f6a7a; }
.context-menu button:hover [data-lucide], .link-context-menu button:hover [data-lucide] { color: #3b82f6; }

.hidden { display: none !important; }

/* Recipe Card Collection Styles */
.collection-card {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px solid #d1d5db;
    border-radius: 16px;
    padding: 16px;
    position: relative;
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-height: 120px;
    min-width: 200px;
}

.collection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.collection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.collection-icon {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

.collection-name {
    font-weight: 600;
    color: #374151;
    font-size: 16px;
}

.collection-watermark {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 10px;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: 1px;
}

.collection-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.collection-mini-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 12px;
    color: #6b7280;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Drag and Drop States */
.recipe-card.dragging {
    cursor: grabbing !important;
    transform: rotate(3deg) scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 9999 !important;
    opacity: 0.9;
}

.recipe-card.magnetic-target {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    transform: scale(1.02);
}

.recipe-card.magnetic-target-pulse {
    animation: magneticPulse 0.6s ease-in-out infinite alternate;
}

@keyframes magneticPulse {
    0% {
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }
    100% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.1);
    }
}

.collection-card.dragging {
    cursor: grabbing !important;
    transform: rotate(2deg) scale(1.03);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 9999 !important;
    opacity: 0.9;
}

.collection-card.magnetic-target {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    transform: scale(1.02);
}

.collection-card.magnetic-target-pulse {
    animation: collectionMagneticPulse 1s infinite;
}

@keyframes collectionMagneticPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

/* === MODAL STYLES === */

.modal-backdrop { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: transparent; 
    backdrop-filter: none; 
    -webkit-backdrop-filter: none; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding-top: 0; 
    opacity: 0; 
    transition: opacity 0.3s ease; 
    pointer-events: none; 
    z-index: 2000;
}

.modal-backdrop:not(.hidden) { 
    opacity: 1; 
    pointer-events: auto; 
}

/* Restoring the correct glassmorphic style from the prototype */
.modal-backdrop .modal-content { 
    max-width: 800px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 90vw; 
    border-radius: 18px; /* --radius-lg */
    transform: scale(0.95); 
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* --transition-springy */
    display: flex; 
    flex-direction: column; 
    max-height: 90vh; 
    z-index: 2001; 
    position: relative; 
}

.modal-backdrop:not(.hidden) .modal-content { 
    transform: scale(1); 
}

#modal-backdrop .modal-content { 
    max-width: 800px; 
}

.modal-header { 
    padding: var(--space-4) var(--space-5); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); 
    flex-shrink: 0; 
}

.modal-title-area { 
    flex-grow: 1; 
}

.modal-title-area input { 
    font-size: var(--font-size-lg); 
    font-weight: var(--font-weight-semibold); 
    border: none; 
    padding: 0; 
    box-shadow: none; 
    width: 100%; 
}

.modal-title-area small { 
    font-size: var(--font-size-xs); 
    color: var(--color-text-subtle); 
}

.modal-tabs { 
    display: flex; 
    gap: var(--space-1); 
    background: var(--color-bg-muted); 
    padding: var(--space-1); 
    border-radius: var(--radius-md); 
    margin: 0 var(--space-4); 
}

.modal-tab { 
    padding: var(--space-2) var(--space-3); 
    border-radius: var(--radius-sm); 
    font-size: var(--font-size-sm); 
    font-weight: var(--font-weight-medium); 
    cursor: pointer; 
    border: none; 
    background: transparent; 
    transition: all .2s ease; 
}

.modal-tab.active { 
    background: var(--color-bg-canvas); 
    color: var(--color-primary-base); 
    box-shadow: var(--shadow-sm); 
}

.modal-body { 
    overflow-y: auto; 
    padding: var(--space-5) 
}

.modal-actions { 
    padding: var(--space-4); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-top: 1px solid var(--color-border-subtle); 
    background-color: var(--color-bg-subtle); 
    border-bottom-left-radius: var(--radius-lg); 
    border-bottom-right-radius: var(--radius-lg); 
    flex-shrink: 0; 
}

/* Custom title input styling */
#modal-title-input {
    font-size: 1.5rem !important;
    font-weight: var(--font-weight-semibold) !important;
    border: none !important;
    padding: 4px 8px !important;
    margin: -4px -8px !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

#modal-title-input:hover {
     background-color: var(--color-bg-subtle) !important;
}

#modal-title-input:focus {
     background-color: var(--color-bg-subtle) !important;
     border: none !important;
     box-shadow: none !important;
}

#modal-title-input::placeholder {
    color: var(--color-text-subtle);
}

/* === FORM STYLES === */

.form-group { 
    margin-bottom: 1rem; 
}

label, .form-label { 
    display: block; 
    font-size: 0.875rem; 
    font-weight: 500; 
    color: #1d1d1f; 
    margin-bottom: 0.5rem; 
}

input[type="text"], textarea, select, .form-input, .form-textarea, .form-select { 
    width: 100%; 
    padding: 12px 16px; 
    border-radius: 10px; 
    font-size: 0.95rem; 
    color: #1d1d1f; 
    background-color: #f7f7f8; 
    border: 1px solid rgba(170, 170, 180, 0.4); 
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; 
    -webkit-appearance: none; 
    -moz-appearance: none; 
    appearance: none; 
}

input[type="text"]:focus, textarea:focus, select:focus, .form-input:focus, .form-textarea:focus, .form-select:focus { 
    outline: none; 
    border-color: #007aff; 
    background-color: rgba(255, 255, 255, 0.5); 
    box-shadow: none; 
}

/* === FILE MANAGEMENT STYLES === */

.file-upload-area { 
    border: none; 
    border-radius: var(--radius-md); 
    overflow: hidden; 
    background: transparent;
}

.file-drop-zone { 
    padding: var(--space-6) var(--space-4); 
    border: 1px dashed var(--color-border-base); 
    border-radius: var(--radius-md); 
    text-align: center; 
    background: #f7f7f8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    margin-bottom: 0; 
    position: relative;
}

.file-drop-zone.drag-over { 
    border-color: var(--color-primary-base); 
    background: var(--color-primary-bg-tint);
    border-style: solid; 
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.drop-zone-icon { 
    display: none;
}

.file-drop-zone p {
    font-size: var(--font-size-base);
    color: var(--color-text-subtle);
    margin: 0;
    font-weight: var(--font-weight-normal);
}

.upload-browse-btn { 
    background: none; 
    border: none; 
    color: var(--color-text-subtle); 
    text-decoration: underline;
    cursor: pointer; 
    font-size: inherit; 
    padding: 0;
    margin: 0;
    font-weight: var(--font-weight-normal);
    transition: all 0.2s ease;
    display: inline;
}

.upload-browse-btn:hover { 
    color: var(--color-primary-base); 
    text-decoration: underline;
}

.file-list-container { 
    margin-top: var(--space-4); 
    background: transparent;
    border: none;
    overflow: visible;
}

.file-list-container:empty { 
    display: none; 
}

.file-list { 
    display: flex; 
    flex-direction: column; 
    gap: var(--space-3);
}

.file-item { 
    display: flex; 
    align-items: center; 
    gap: var(--space-4); 
    padding: var(--space-4); 
    background: var(--color-bg-canvas); 
    border: 1px solid var(--color-border-subtle); 
    border-radius: var(--radius-md);
    transition: all 0.2s ease; 
    position: relative;
    margin-bottom: 0;
    box-shadow: var(--shadow-sm);
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-item:hover { 
    background: rgba(59, 130, 246, 0.03);
    border-color: var(--color-primary-base);
    transform: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.file-preview { 
    width: 48px; 
    height: 48px; 
    border-radius: var(--radius-md); 
    overflow: hidden; 
    flex-shrink: 0; 
    background: linear-gradient(135deg, var(--color-bg-muted) 0%, var(--color-bg-subtle) 100%);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border: 1px solid var(--color-border-subtle);
    box-shadow: var(--shadow-sm);
}

.file-preview img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.file-preview-icon { 
    width: 24px; 
    height: 24px; 
    color: var(--color-primary-base); 
    opacity: 0.7;
}

.file-info { 
    flex-grow: 1; 
    min-width: 0; 
}

.file-name { 
    font-weight: var(--font-weight-semibold); 
    color: var(--color-text-primary); 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    font-size: var(--font-size-base);
    margin-bottom: var(--space-1);
}

.file-meta { 
    font-size: var(--font-size-sm); 
    color: var(--color-text-subtle); 
}

.file-actions { 
    display: flex; 
    gap: var(--space-2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.file-action-btn { 
    background: var(--color-bg-muted); 
    border: 1px solid var(--color-border-base); 
    padding: var(--space-2); 
    border-radius: var(--radius-sm); 
    cursor: pointer; 
    transition: all 0.2s ease; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 32px;
    height: 32px;
}

.file-action-btn:hover { 
    background: var(--color-bg-canvas); 
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.file-action-btn i { 
    width: 14px; 
    height: 14px; 
    color: var(--color-text-secondary); 
}

.file-action-btn.delete:hover { 
    background: var(--color-accent-danger); 
    border-color: var(--color-accent-danger);
}

.file-action-btn.delete:hover i { 
    color: white; 
}

/* === CONTEXT MENU STYLES === */

#context-menu { 
    position: fixed; 
    z-index: var(--z-context-menu); 
    background: var(--color-bg-canvas); 
    border-radius: var(--radius-md); 
    box-shadow: var(--shadow-lg); 
    padding: var(--space-2); 
    min-width: 200px; 
    opacity: 0; 
    transform: scale(0.95); 
    transition: all .15s ease; 
    pointer-events: none; 
}

#context-menu.visible { 
    opacity: 1; 
    transform: scale(1); 
    pointer-events: auto; 
}

.context-menu-item { 
    display: flex; 
    align-items: center; 
    gap: var(--space-3); 
    padding: var(--space-2) var(--space-3); 
    border-radius: var(--radius-sm); 
    font-size: var(--font-size-sm); 
    cursor: pointer; 
    background: none; 
    border: none; 
    width: 100%; 
    text-align: left; 
}

.context-menu-item:hover { 
    background-color: var(--color-bg-muted); 
}

.context-menu-item i { 
    color: var(--color-text-secondary); 
}

.context-menu-divider { 
    height: 1px; 
    background-color: var(--color-border-subtle); 
    margin: var(--space-2) 0; 
}

/* === BUTTON STYLES === */

.btn { 
    font-family: inherit; 
    border: none; 
    border-radius: var(--radius-md); 
    padding: var(--space-3) var(--space-5); 
    font-size: var(--font-size-base); 
    font-weight: var(--font-weight-medium); 
    cursor: pointer; 
    transition: all var(--transition-snap); 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: var(--space-2); 
}

.btn:active { 
    transform: translateY(1px) scale(0.98); 
}

.btn-primary { 
    background-color: #007aff; 
    color: white; 
}

.btn-primary:hover { 
    background-color: #005ecb; 
    box-shadow: 0 3px 6px rgba(0,0,0,0.1); 
}

.btn-secondary { 
    background-color: var(--color-bg-muted); 
    color: var(--color-text-primary); 
}

.btn-secondary:hover { 
    background-color: #e6e9ef; 
}

.btn-danger { 
    background-color: var(--color-accent-danger); 
    color: white; 
}

.btn-danger:hover { 
    background-color: var(--color-accent-danger-hover); 
}

.btn-icon { 
    background: none; 
    border: none; 
    padding: var(--space-1); 
    cursor: pointer; 
    color: var(--color-text-secondary); 
    line-height: 0; 
    border-radius: var(--radius-sm); 
}

.btn-icon:hover { 
    background-color: #eef2f7; 
    color: var(--color-accent-danger); 
}

/* === MODAL CLOSE BUTTON === */

.modal-close-btn { 
    position: absolute; 
    top: 18px; 
    right: 18px; 
    background: none; 
    border: none; 
    font-size: 1.9rem; 
    color: rgba(60, 60, 67, 0.5); 
    cursor: pointer; 
    padding: 5px; 
    line-height: 1; 
    transition: color 0.2s ease, transform 0.2s ease; 
    user-select: none; 
}

.modal-close-btn:hover { 
    color: rgba(60, 60, 67, 0.8); 
    transform: scale(1.1); 
}

.modal-header .modal-close-btn {
    position: static;
    top: auto;
    right: auto;
    margin-left: var(--space-3);
}

/* ===========================================
    END OF RECIPE CARD STYLES
   =========================================== */