/**
 * Component Styles - Reusable UI components
 * Contains styles for buttons, forms, alerts, and other reusable elements
 */

/* ===== NAVIGATION ===== */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== STATUS INDICATORS ===== */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #27ae60;
    display: inline-block;
    margin-right: 8px;
}

.status-indicator.loading {
    background: #f39c12;
    animation: pulse 1s infinite;
}

.status-indicator.error {
    background: #e74c3c;
}

.status-indicator.complete {
    background: #27ae60;
}

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

.engine-status {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

/* ===== FORM ELEMENTS ===== */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: end;
}

.form-group {
    flex: 1;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #95a5a6;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.copy-btn, .pdf-btn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    margin-top: 10px;
}

.pdf-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

/* ===== TEXT AREAS ===== */
textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea::placeholder {
    color: #999;
    opacity: 0.7;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

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

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

/* ===== SECTIONS ===== */
.section {
    margin-bottom: 30px;
}

.section h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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