/* File: ai-robot-pid-parameter-tuner.css
   AI Robot PID Parameter Tuner - Specific Styles
   Extends common.css without disrupting existing styles
*/

/* Main container adjustments */
.pid-tuner-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* Hero Header Section */
.pid-tuner-header {
    background: linear-gradient(135deg, #0f2b3d 0%, #1e4a6e 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
    text-align: center;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

.pid-tuner-header h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.pid-tuner-header h1 i {
    margin-right: 10px;
}

.pid-tuner-header p {
    opacity: 0.92;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Two column layout for main tool */
.pid-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem;
    margin-bottom: 2.5rem;
}

/* Card styles */
.pid-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: box-shadow 0.2s ease;
}

.pid-card h3 {
    margin-top: 0;
    margin-bottom: 1.25rem;
    font-size: 1.3rem;
    color: #1e4668;
    border-left: 4px solid #3b82f6;
    padding-left: 0.75rem;
}

/* Parameter sliders */
.param-group {
    margin-bottom: 1.25rem;
}

.param-group label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.param-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    -webkit-appearance: none;
    appearance: none;
}

.param-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    border: none;
}

.param-value {
    font-family: 'Courier New', monospace;
    background: #f1f5f9;
    padding: 0.2rem 0.7rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 1.5rem 0 1rem;
}

.btn-pid {
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-primary {
    background: #1e4668;
    color: white;
}

.btn-primary:hover {
    background: #0f2b3d;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #475569;
    color: white;
}

.btn-secondary:hover {
    background: #334155;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #1e4668;
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #1e4668;
}

/* Metrics */
.metric-item {
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0.6rem;
}

.metric-label {
    font-weight: 600;
    display: inline-block;
    width: 140px;
}

/* Graph */
.graph-container {
    margin-top: 1rem;
    background: #ffffff;
    border-radius: 1rem;
    padding: 0.5rem;
}

canvas {
    width: 100%;
    height: auto;
    max-height: 260px;
}

.stability-badge {
    background: #f1f5f9;
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    margin-top: 0.8rem;
}

/* ========== TWO-COLUMN INFO SECTION (How To + FAQ) ========== */
.info-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2.5rem 0;
}

.info-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.8rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    height: fit-content;
}

.info-card h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #1e4668;
    border-left: 4px solid #3b82f6;
    padding-left: 0.75rem;
}

/* How To Steps Styling */
.howto-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 1rem;
    transition: transform 0.2s ease;
}

.step-item:hover {
    transform: translateX(5px);
    background: #f1f5f9;
}

.step-number {
    background: #3b82f6;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    color: #1e4668;
    margin-bottom: 0.25rem;
}

.step-content p {
    margin: 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Pro Tip Box */
.pro-tip {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #e6f7ff;
    border-radius: 1rem;
    border-left: 4px solid #3b82f6;
}

.pro-tip strong {
    color: #1e4668;
}

.pro-tip p {
    margin: 0.25rem 0 0 0;
    color: #475569;
    font-size: 0.9rem;
}

/* Example Box */
.example-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #1e4668;
    border-radius: 1rem;
    color: white;
}

.example-box pre {
    margin: 0.5rem 0 0 0;
    padding: 0.75rem;
    background: #0f2b3d;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-size: 0.8rem;
    font-family: monospace;
    color: #e2e8f0;
}

/* FAQ Items */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0;
}

.faq-question {
    cursor: pointer;
    padding: 1rem 0;
    font-weight: 600;
    color: #1e4668;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.faq-question:hover {
    color: #3b82f6;
}

.faq-question i {
    transition: transform 0.2s ease;
}

.faq-question.open i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 0 1rem 0;
    color: #475569;
    line-height: 1.6;
    display: none;
}

/* Feature badges for FAQ */
.feature-badge {
    display: inline-block;
    background-color: #e7f5ff;
    color: #1971c2;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.8rem;
    margin: 4px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pid-grid-2col {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .info-two-column {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .metric-label {
        width: auto;
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .step-item {
        padding: 0.5rem;
    }
    
    .info-card {
        padding: 1.2rem;
    }
    
    .btn-group {
        justify-content: center;
    }
    
    .btn-pid {
        flex: 1;
        text-align: center;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .pid-grid-2col {
        gap: 1.2rem;
    }
    
    .metric-label {
        width: 120px;
    }
}

/* Print styles */
@media print {
    .btn-group, .param-slider, .site2info-header, footer, .btn-pid {
        display: none;
    }
    
    .pid-card, .info-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}