/* Append to style.css */

/* Tabs */
/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.header-main h1 {
    margin: 0;
}

.header-main p {
    margin: 0.5rem 0 0 0;
    color: var(--text-muted);
}

.user-section {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.user-icon {
    font-size: 1.2rem;
}

.user-name {
    font-weight: 500;
    color: var(--text);
}

/* Modal Small Variant */
.modal-small {
    max-width: 400px;
}

/* Recipe Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.admin-only {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

.similarity-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
}

.similarity-badge.high {
    background: #ef4444;
    color: white;
}

.similarity-badge.medium {
    background: #f59e0b;
    color: white;
}

.similarity-badge.low {
    background: #22c55e;
    color: white;
}

.text-muted {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.badge-source {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    color: var(--text-muted);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Recipes Table */
.recipes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.recipes-table th,
.recipes-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.recipes-table th {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.recipes-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.recipes-table a {
    color: var(--primary);
    text-decoration: none;
}

.recipes-table a:hover {
    text-decoration: underline;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

/* Ingredient Item Layout */
.ingredient-item {
    display: grid;
    grid-template-columns: auto 80px 80px 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.drag-handle {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ingredient-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-icon:hover:not(:disabled) {
    opacity: 1;
}

.btn-icon:disabled {
    opacity: 0.2;
    cursor: default;
}

.btn-danger-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 0.5rem;
    transition: transform 0.2s;
}

.btn-danger-icon:hover {
    transform: scale(1.1);
}

.add-row-container {
    margin-top: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Instruction Item Layout */
.instruction-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.step-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 40px;
}

.step-number {
    background: var(--primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.step-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    align-items: center;
}

.instruction-text {
    flex: 1;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    resize: vertical;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.modal-body textarea:focus {
    outline: none;
    border-color: var(--primary);
}