﻿/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f7f9fc;
    padding: 0;
    margin: 0;

}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    
}

/* Typography */
h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

p {
    margin-bottom: 1rem;
}

/* Header & Nav */
.ingredients-import__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e1e5e9;
}

.ingredients-import__vendor-selection {
    text-align: center;
    margin-bottom: 10px;
}
.ingredients-import__field {
    min-width: 280px;
    text-align: left;
    
}
.ingredients-import-row {
    display: flex;
    flex-flow: row wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 60px;
}



.ingredients-import__title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
}

.ingredients-import__close {
    font-size: 28px;
    color: #95a5a6;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s;
}

    .ingredients-import__close:hover {
        background-color: #f1f2f3;
        color: #e74c3c;
    }

.breadcrumbs {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-size: 14px;
}

    .breadcrumbs a {
        color: #3498db;
        text-decoration: none;
    }

        .breadcrumbs a:hover {
            text-decoration: underline;
        }

    .breadcrumbs .separator {
        margin: 0 8px;
        color: #95a5a6;
    }

    .breadcrumbs .current {
        color: #7f8c8d;
        font-weight: 500;
    }

/* Alerts */
.ingredients-import__alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
}

.ingredients-import__alert--success {
    background-color: #e8f7f0;
    border-left: 4px solid #2ecc71;
    color: #27ae60;
}

.ingredients-import__alert--error {
    background-color: #fceaeb;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
}

.ingredients-import__alert-icon {
    margin-right: 0.75rem;
    font-size: 18px;
}

/* Upload Section */
.ingredients-import__upload {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    overflow: hidden;
}

.ingredients-import__upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
}

.ingredients-import__upload-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f7ff;
    border-radius: 50%;
    margin-bottom: 1.25rem;
}

    .ingredients-import__upload-icon svg {
        width: 32px;
        height: 32px;
        color: #3498db;
    }

.ingredients-import__upload-title {
    margin-bottom: 1rem;
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
}

.ingredients-import__upload-instructions {
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.text-sm {
    font-size: 14px;
}

.text-muted {
    color: #7f8c8d;
}

.ingredients-import__file-label {
    display: flex;
    align-items: center;
    border: 2px dashed #dce4ec;
    border-radius: 6px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    max-width: 400px;
    margin-bottom: 1.5rem;
}

    .ingredients-import__file-label:hover {
        border-color: #3498db;
    }

.ingredients-import__file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.ingredients-import__file-button {
    background-color: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-right: 1rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.ingredients-import__file-label:hover .ingredients-import__file-button {
    background-color: #2980b9;
}

.ingredients-import__file-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Buttons */
.ingredients-import__upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    font-size: 15px;
    background-color: #3498db;
    color: white;
}

    .ingredients-import__upload-button:hover {
        background-color: #2980b9;
    }

.ingredients-import__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    font-size: 15px;
    background-color: #ecf0f1;
    color: #7f8c8d;
}

    .ingredients-import__button:hover {
        background-color: #dce4ec;
        color: #2c3e50;
    }

.ingredients-import__button--primary {
    background-color: #3498db;
    color: white;
}

    .ingredients-import__button--primary:hover {
        background-color: #2980b9;
    }

/* Sample Format */
.ingredients-import__sample {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
}

.ingredients-import__sample-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.ingredients-import__sample-code {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 14px;
    overflow-x: auto;
}

/* Results Summary */
.ingredients-import__results {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.ingredients-import__results-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.ingredients-import__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ingredients-import__stat {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 1.25rem 1rem;
    text-align: center;
}

.ingredients-import__stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
    color: #2c3e50;
}

.ingredients-import__stat-label {
    font-size: 14px;
    color: #7f8c8d;
}

.ingredients-import__stat--success .ingredients-import__stat-value {
    color: #2ecc71;
}

.ingredients-import__stat--warning .ingredients-import__stat-value {
    color: #f1c40f;
}

/* Unit Type Mappings */
.unit-type-mappings {
    margin-top: 2rem;
}

.unit-type-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    overflow: hidden;
}

    .unit-type-table th {
        background-color: #f5f7fa;
        text-align: left;
        padding: 0.75rem 1rem;
        font-weight: 600;
        border-bottom: 1px solid #e1e5e9;
    }

    .unit-type-table td {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #e1e5e9;
    }

    .unit-type-table tr:last-child td {
        border-bottom: none;
    }

/* Actions */
.ingredients-import__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .ingredients-import__stats {
        grid-template-columns: 1fr;
    }

    .ingredients-import__file-label {
        flex-direction: column;
        align-items: stretch;
    }

    .ingredients-import__file-button {
        margin-right: 0;
        margin-bottom: 0.75rem;
        text-align: center;
    }

    .ingredients-import__actions {
        flex-direction: column;
    }

    .ingredients-import__button {
        width: 100%;
    }
}


/* Import Modal */
/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
}

    .modal-header h2 {
        margin: 0;
        font-size: 1.25rem;
    }

.modal-body {
    padding: 24px;
}

.progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.progress-spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


.required-indicator {
    color: #dc2626;
    margin-left: 4px;
}

.ingredients-import__add-vendor-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--theme-primary, #4d333e);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-top: 4px;
}

    .ingredients-import__add-vendor-btn:hover {
        opacity: 0.9;
        transform: translateY(-1px);
    }

.add-vendor-icon {
    background: white;
    color: var(--theme-primary, #4d333e);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.ingredients-import__help-text {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

.ingredients-import__validation {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #dc2626;
}

.ingredients-import__vendor-info {
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.vendor-info-card h4 {
    margin: 0 0 8px 0;
    color: var(--theme-primary, #4d333e);
    font-size: 16px;
}

.vendor-info-card p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.ingredients-import__upload-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #9ca3af;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ingredients-import-row {
        flex-direction: column;
        gap: 16px;
    }

    .ingredients-import__add-vendor-btn {
        justify-content: center;
    }
}