/* ============================================
   Vector Calculator - Calculator-Specific Styles
   ============================================
   ⚠️ CRITICAL: This file ONLY contains calculator-specific styles.
   Global classes (.glass-card, .form-input, .btn-custom, etc.) are
   defined in layout.css and MUST NOT be redefined here.
   ============================================ */

/* Mode Toggle Buttons */
.mode-toggle-container {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.mode-toggle-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #667eea;
    border-radius: 12px;
    background: white;
    color: #667eea;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-toggle-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.mode-toggle-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Component Input Grid */
.vector-input-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.vector-input-grid.mode-2d {
    grid-template-columns: repeat(2, 1fr);
}

.component-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Hide z-component in 2D mode - override any inline styles */
.vector-input-grid.mode-2d .z-component {
    display: none !important;
}

.component-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
    text-align: center;
}

/* Operation Selector */
.operation-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 1rem;
}

.operation-btn {
    padding: 10px;
    border: 2px solid #48bb78;
    border-radius: 10px;
    background: white;
    color: #48bb78;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.operation-btn:hover {
    background: #48bb78;
    color: white;
    transform: scale(1.02);
}

.operation-btn.active {
    background: #48bb78;
    color: white;
    box-shadow: 0 3px 12px rgba(72, 187, 120, 0.3);
}

.operation-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f0f0f0;
    color: #999;
    border-color: #ddd;
}

.operation-btn:disabled:hover {
    transform: none;
}

/* Results Display */
.result-section {
    margin-top: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.result-label {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #555;
}

.result-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
}

.result-value.highlight {
    font-size: 1.3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Visualization Canvas */
.visualization-container {
    margin-top: 1.5rem;
}

#vectorCanvas {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

#vectorCanvas3D {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Calculation Steps */
.calculation-steps {
    margin-top: 1rem;
}

.step-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: rgba(72, 187, 120, 0.05);
    border-radius: 10px;
    border-left: 3px solid #48bb78;
}

.step-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #48bb78;
    margin-bottom: 5px;
}

.step-formula {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: #555;
    padding: 8px;
    background: white;
    border-radius: 6px;
    overflow-x: auto;
}

/* Parallel/Perpendicular Indicators */
.relationship-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin-left: 10px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
}

.relationship-indicator.perpendicular {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.relationship-indicator.parallel {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

/* Responsive Design */
@media (max-width: 992px) {
    .vector-input-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .vector-input-grid.mode-2d {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .operation-selector {
        grid-template-columns: 1fr;
    }

    .result-item {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    #vectorCanvas {
        height: 300px;
    }

    #vectorCanvas3D {
        height: 350px;
    }
}

@media (max-width: 576px) {
    .mode-toggle-container {
        flex-direction: column;
    }

    .component-label {
        font-size: 0.85rem;
    }

    .operation-btn {
        font-size: 0.85rem;
        padding: 8px;
    }
}
