/**
 * Season & Sauce Lab - Frontend Styles
 */

/* Container */
.ssl-blend-builder {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Progress Bar */
.ssl-progress {
    margin-bottom: 30px;
}

.ssl-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.ssl-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.3s ease;
}

.ssl-progress-steps {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px;
}

.ssl-step-indicator {
    font-size: 12px;
    color: #888;
    padding: 5px 10px;
    border-radius: 15px;
    background: #f5f5f5;
    transition: all 0.3s ease;
}

.ssl-step-indicator.active {
    background: #4CAF50;
    color: white;
    font-weight: 600;
}

.ssl-step-indicator.completed {
    background: #8BC34A;
    color: white;
}

/* Current Blend Summary */
.ssl-current-blend {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 25px;
}

.ssl-current-blend h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.ssl-blend-summary .ssl-empty-message {
    color: #888;
    font-style: italic;
    margin: 0;
}

.ssl-selected-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ssl-selected-list li {
    background: #fff;
    border: 1px solid #4CAF50;
    color: #333;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ssl-selected-list li .ssl-ratio {
    background: #4CAF50;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.ssl-selected-list li .ssl-remove-selected {
    cursor: pointer;
    color: #dc3545;
    font-weight: bold;
    line-height: 1;
}

/* Steps */
.ssl-step {
    display: none;
}

.ssl-step.active {
    display: block;
}

.ssl-step h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.ssl-step-description {
    color: #666;
    margin-bottom: 20px;
}

/* Purpose Grid */
.ssl-purpose-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.ssl-purpose-category h4 {
    margin: 0 0 12px 0;
    color: #555;
    font-size: 16px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
}

.ssl-purpose-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ssl-purpose-btn {
    background: #fff;
    border: 2px solid #ddd;
    color: #333;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.ssl-purpose-btn:hover {
    border-color: #4CAF50;
    background: #f8fff8;
}

.ssl-purpose-btn.selected {
    border-color: #4CAF50;
    background: #4CAF50;
    color: white;
}

/* Filters */
.ssl-filters {
    margin-bottom: 20px;
}

.ssl-search {
    width: 100%;
    max-width: 400px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.ssl-search:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Ingredient Grid */
.ssl-ingredient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.ssl-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    padding: 40px;
}

/* Ingredient Card */
.ssl-ingredient-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ssl-ingredient-card:hover {
    border-color: #4CAF50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.ssl-ingredient-card.selected {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #f8fff8 0%, #e8f5e9 100%);
}

.ssl-ingredient-card .ssl-card-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 15px;
}

.ssl-ingredient-card .ssl-card-type {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ssl-ingredient-card .ssl-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.ssl-ingredient-card .ssl-card-tag {
    background: #f0f0f0;
    color: #666;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
}

.ssl-ingredient-card .ssl-card-ratio {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.ssl-ingredient-card .ssl-card-ratio label {
    font-size: 12px;
    color: #666;
}

.ssl-ingredient-card .ssl-ratio-input {
    width: 60px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.ssl-ingredient-card .ssl-card-match {
    font-size: 10px;
    color: #4CAF50;
    font-weight: 600;
}

/* Step Navigation */
.ssl-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Buttons */
.ssl-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.ssl-btn:hover {
    background: #43a047;
}

.ssl-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ssl-btn-back {
    background: #f5f5f5;
    color: #666;
}

.ssl-btn-back:hover {
    background: #e0e0e0;
}

.ssl-btn-restart {
    background: #ff9800;
}

.ssl-btn-restart:hover {
    background: #f57c00;
}

.ssl-btn-save {
    background: #2196F3;
}

.ssl-btn-save:hover {
    background: #1976D2;
}

/* Review Section */
.ssl-review-section {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.ssl-review-section h4 {
    margin: 0 0 15px 0;
    color: #4CAF50;
    font-size: 18px;
}

.ssl-review-table {
    width: 100%;
    border-collapse: collapse;
}

.ssl-review-table th,
.ssl-review-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.ssl-review-table th {
    background: #f8f9fa;
    color: #333;
    font-weight: 600;
    font-size: 13px;
}

.ssl-review-table td {
    color: #555;
}

.ssl-review-table .ssl-review-ratio {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ssl-review-table .ssl-remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.ssl-review-table .ssl-remove-btn:hover {
    background: #c82333;
}

/* Save Section */
.ssl-save-section {
    background: #e3f2fd;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.ssl-save-section h4 {
    margin: 0 0 15px 0;
    color: #1976D2;
}

.ssl-save-form {
    display: flex;
    gap: 10px;
}

.ssl-save-form input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.ssl-save-form input:focus {
    outline: none;
    border-color: #2196F3;
}

/* Login Notice */
.ssl-login-notice {
    background: #fff3e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.ssl-login-notice p {
    margin: 0 0 15px 0;
    color: #e65100;
}

/* Messages */
.ssl-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ssl-message-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.ssl-message-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Responsive */
@media (max-width: 768px) {
    .ssl-ingredient-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .ssl-progress-steps {
        justify-content: center;
    }
    
    .ssl-step-indicator {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .ssl-step-nav {
        flex-wrap: wrap;
    }
    
    .ssl-save-form {
        flex-direction: column;
    }
}
