/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    color: #6c757d;
    font-size: 1.1em;
}

/* Main content */
main {
    flex: 1;
}

/* Card styling */
.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Actions styling */
.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: #495057;
}

.input-group input {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    max-width: 300px;
}

.input-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Button styles */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-height: 48px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

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

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

.btn-primary:hover:not(:disabled) {
    background-color: #0056b3;
}

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

.btn-secondary:hover:not(:disabled) {
    background-color: #545b62;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover:not(:disabled) {
    background-color: #117a8b;
}

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

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

.btn-icon {
    font-size: 1.1em;
}

/* Loading spinner */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px;
    color: #6c757d;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Results styling */
.results {
    min-height: 100px;
}

.placeholder {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 30px;
}

.result-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.result-item h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.result-success {
    border-left: 4px solid #28a745;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.result-error {
    border-left: 4px solid #dc3545;
    background-color: #f8d7da;
    border-color: #f1b0b7;
}

.result-info {
    border-left: 4px solid #17a2b8;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.result-content {
    margin: 10px 0;
}

.result-content pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    overflow-x: auto;
    font-size: 14px;
    white-space: pre-wrap;
}

.timestamp {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 10px;
}

/* Help section */
.help-section {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.help-content {
    display: grid;
    gap: 15px;
}

.help-item {
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.help-item strong {
    color: #2c3e50;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    color: #6c757d;
    font-size: 0.9em;
    border-top: 1px solid #e9ecef;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .product-actions {
        align-items: stretch;
    }
    
    .input-group input {
        max-width: none;
    }
}

/* Blazor error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
}