/**
 * New Product Entry Form Styles
 * Multi-step form with progress bar
 */

/* Container */
.new-product-entry-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.new-product-entry-container h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

/* Alert System */
.npe-alert-container {
    margin-bottom: 20px;
}

.npe-alert {
    padding: 12px 40px 12px 16px;
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.npe-alert.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.npe-alert.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.npe-alert.warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.npe-alert.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.npe-alert-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.npe-alert-close:hover {
    opacity: 1;
}

/* Progress Bar */
.npe-progress-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.npe-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
    transition: all 0.3s;
}

.npe-progress-step.completed {
    cursor: pointer;
}

.npe-progress-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.npe-progress-step.active .npe-progress-number {
    background: #4A90A4;
    color: white;
}

.npe-progress-step.completed .npe-progress-number {
    background: #28a745;
    color: white;
}

.npe-progress-step.completed .npe-progress-number::after {
    content: "✓";
}

.npe-progress-step.completed .npe-progress-number {
    font-size: 0;
}

.npe-progress-step.completed .npe-progress-number::after {
    font-size: 16px;
}

.npe-progress-label {
    font-size: 12px;
    color: #666;
    text-align: center;
    white-space: nowrap;
}

.npe-progress-step.active .npe-progress-label {
    color: #4A90A4;
    font-weight: 500;
}

.npe-progress-step.completed .npe-progress-label {
    color: #28a745;
}

.npe-progress-line {
    flex: 1;
    height: 2px;
    background: #ddd;
    margin: 0 10px;
    margin-bottom: 24px;
    max-width: 60px;
}

/* Form Steps */
.npe-step {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 20px;
}

.npe-step h3 {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #4A90A4;
    color: #333;
    font-size: 18px;
}

/* Form Rows and Groups */
.npe-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.npe-form-row-3 {
    flex-wrap: wrap;
}

.npe-form-row-3 .npe-form-group {
    flex: 1;
    min-width: 150px;
}

.npe-form-group {
    flex: 1;
}

.npe-form-group-small {
    flex: 0 0 120px;
}

.npe-form-group-full {
    flex: 1 1 100%;
}

.npe-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.npe-form-group label .required {
    color: #dc3545;
}

.npe-form-group input,
.npe-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.npe-form-group input:focus,
.npe-form-group select:focus {
    outline: none;
    border-color: #4A90A4;
    box-shadow: 0 0 0 2px rgba(74, 144, 164, 0.1);
}

.npe-help-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}

/* SKU Row */
.npe-sku-row {
    align-items: flex-end;
}

/* SKU Preview */
.npe-sku-preview {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.npe-sku-label {
    font-weight: 500;
    color: #666;
}

.npe-sku-value {
    font-family: monospace;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Validation Actions */
.npe-validation-actions {
    margin-bottom: 20px;
}

/* Validation Results */
.npe-validation-results {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.npe-validation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.npe-validation-item:last-child {
    border-bottom: none;
}

.npe-validation-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.npe-validation-icon.success {
    background: #d4edda;
    color: #28a745;
}

.npe-validation-icon.warning {
    background: #fff3cd;
    color: #856404;
}

.npe-validation-icon.error {
    background: #f8d7da;
    color: #dc3545;
}

.npe-validation-icon .loading {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Price Display */
.npe-price-display {
    display: flex;
    gap: 30px;
    background: #e8f5e9;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.npe-price-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.npe-price-label {
    font-weight: 500;
    color: #666;
}

.npe-price-value {
    font-size: 18px;
    font-weight: 600;
    color: #28a745;
}

/* Sub-forms */
.npe-subform {
    background: #fff8e1;
    border: 1px solid #ffcc80;
    border-radius: 4px;
    padding: 20px;
    margin-top: 20px;
}

.npe-subform h4 {
    margin: 0 0 10px 0;
    color: #f57c00;
    font-size: 16px;
}

.npe-subform-note {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

/* Buttons */
.npe-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.npe-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.npe-btn-primary {
    background: #4A90A4;
    color: white;
}

.npe-btn-primary:hover:not(:disabled) {
    background: #3d7a8c;
}

.npe-btn-secondary {
    background: #6c757d;
    color: white;
}

.npe-btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.npe-btn-success {
    background: #28a745;
    color: white;
}

.npe-btn-success:hover:not(:disabled) {
    background: #218838;
}

.npe-btn-danger {
    background: #dc3545;
    color: white;
}

.npe-btn-danger:hover:not(:disabled) {
    background: #c82333;
}

.npe-btn-warning {
    background: #ffc107;
    color: #212529;
}

.npe-btn-warning:hover:not(:disabled) {
    background: #e0a800;
}

.npe-btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Form Navigation */
.npe-form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.npe-form-navigation .npe-btn-secondary {
    margin-right: auto;
}

/* WooCommerce Check */
.npe-wc-check-status {
    text-align: center;
    padding: 40px;
}

.npe-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4A90A4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.npe-wc-result-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.npe-wc-result-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
}

.npe-wc-match-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.npe-wc-match-list li {
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
}

.npe-wc-match-list li strong {
    display: block;
    margin-bottom: 4px;
}

.npe-wc-match-meta {
    font-size: 12px;
    color: #666;
}

.npe-wc-no-match {
    color: #28a745;
    font-style: italic;
}

.npe-wc-action-summary {
    background: #e3f2fd;
    border: 1px solid #90caf9;
}

.npe-action-success {
    color: #28a745;
    font-weight: 500;
}

.npe-action-info {
    color: #0c5460;
    font-weight: 500;
}

.npe-action-warning {
    color: #856404;
    font-weight: 500;
}

.npe-action-error {
    color: #dc3545;
    font-weight: 500;
}

/* Stopping Point */
.npe-stopping-point {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 4px;
    padding: 20px;
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.npe-stopping-point.overridden {
    opacity: 0.6;
    border-style: dashed;
}

.npe-stopping-icon {
    width: 50px;
    height: 50px;
    background: #ffc107;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #856404;
    flex-shrink: 0;
}

.npe-stopping-content h4 {
    margin: 0 0 10px 0;
    color: #856404;
}

.npe-stopping-content p {
    margin-bottom: 15px;
    color: #666;
}

.npe-stopping-actions {
    display: flex;
    gap: 10px;
}

/* Seasonality Preview */
.npe-seasonality-preview {
    margin-top: 30px;
}

.npe-seasonality-preview h4 {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.npe-week-grid {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    gap: 4px;
    margin-bottom: 15px;
}

.npe-week {
    padding: 8px 4px;
    text-align: center;
    font-size: 12px;
    border-radius: 2px;
    background: #eee;
    color: #666;
}

.npe-week.available {
    background: #c8e6c9;
    color: #2e7d32;
}

.npe-week.limited {
    background: #fff9c4;
    color: #f57f17;
}

.npe-week.unavailable {
    background: #ffcdd2;
    color: #c62828;
}

.npe-week-legend {
    display: flex;
    gap: 20px;
    font-size: 12px;
}

.npe-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.npe-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.npe-legend-color.available {
    background: #c8e6c9;
}

.npe-legend-color.limited {
    background: #fff9c4;
}

.npe-legend-color.unavailable {
    background: #ffcdd2;
}

/* Checkbox Groups for Filters */
.npe-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 150px;
    overflow-y: auto;
}

.npe-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.2s;
}

.npe-checkbox-label:hover {
    border-color: #4A90A4;
    background: #f0f7fa;
}

.npe-checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.npe-checkbox-label input[type="checkbox"]:checked + span,
.npe-checkbox-label:has(input:checked) {
    background: #e3f2fd;
    border-color: #4A90A4;
}

/* Filter Note */
.npe-filter-note {
    background: #e3f2fd;
    padding: 12px 16px;
    border-radius: 4px;
    margin-top: 20px;
}

.npe-filter-note p {
    margin: 0;
    font-size: 14px;
    color: #0c5460;
}

/* Review Section */
.npe-review-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.npe-review-section h4 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
}

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

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

.npe-review-table th {
    width: 150px;
    font-weight: 500;
    color: #666;
}

.npe-review-table td {
    color: #333;
}

/* Results Section */
.npe-results-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #ddd;
}

.npe-results-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

.npe-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.npe-result-item.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.npe-result-item.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.npe-result-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.npe-result-item.success .npe-result-icon {
    background: #28a745;
    color: white;
}

.npe-result-item.error .npe-result-icon {
    background: #dc3545;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .npe-form-row {
        flex-direction: column;
        gap: 15px;
    }

    .npe-form-group-small {
        flex: 1;
    }

    .npe-week-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .npe-price-display {
        flex-direction: column;
        gap: 15px;
    }

    .npe-stopping-point {
        flex-direction: column;
    }

    .npe-progress-container {
        flex-wrap: wrap;
        gap: 10px;
    }

    .npe-progress-line {
        display: none;
    }

    .npe-progress-step {
        flex: 0 0 auto;
    }

    .npe-form-navigation {
        flex-direction: column;
    }

    .npe-form-navigation .npe-btn-secondary {
        margin-right: 0;
    }
}
