/* ============================================
   TOOLS COMMON STYLES
   Shared styles for all free tool pages
   (shot-noise-calculator, mode-matching, squeezed-light-visualizer)
   ============================================ */

/* ============================================
   COLOR PALETTE
   ============================================ */
:root {
    --primary-purple: #667eea;
    --secondary-purple: #764ba2;
    --text-dark: #2c3e50;
    --text-medium: #495057;
    --text-light: #555;
    --background-light: #f8f9fa;
    --border-color: #dee2e6;
    --border-light: #e9ecef;
    --white: #ffffff;
}

/* ============================================
   CONTAINER STYLES
   ============================================ */
.calculator-container,
.visualizer-container,
.calculator {
    background: var(--white);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.calculator h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin: 2rem 0 1rem 0;
    font-weight: 600;
}

.calculator p,
.calculator-notes p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ============================================
   INFO PANELS
   ============================================ */
.info-panel {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    color: var(--white);
}

.info-panel h3 {
    margin-top: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--white);
}

.info-panel p {
    margin-bottom: 0;
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--white);
}

/* ============================================
   INPUT SECTIONS
   ============================================ */
.input-section,
.user-inputs {
    background: var(--background-light);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 2px solid var(--border-light);
}

.input-section h3 {
    color: var(--text-dark);
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
}

.input-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 2em;
}

.input-group label {
    color: var(--text-medium);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.input-group input {
    flex: 1;
    max-width: 6em;
}

/* ============================================
   BUTTONS
   ============================================ */
button,
.calculate-button,
.calculator button {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
    color: var(--white);
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
    margin: 20px auto;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

button:hover,
.calculate-button:hover,
.calculator button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

button:active,
.calculate-button:active,
.calculator button:active {
    transform: translateY(0);
}

button:disabled,
.calculator button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calculate-button {
    width: 100%;
    padding: 10px;
    margin-top: 15px;
}

/* ============================================
   RESULTS SECTIONS
   ============================================ */
.results-section,
.mode-matching-results {
    background: var(--white);
    border: 2px solid var(--primary-purple);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.results-section > p,
.mode-matching-results > p {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-purple);
    margin-bottom: 1rem;
    text-align: center;
}

/* ============================================
   EDUCATIONAL/NOTES CONTENT
   ============================================ */
.educational-content,
.calculator-notes {
    background: var(--white);
    margin-top: 3rem;
}

.educational-content h3,
.calculator-notes h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
}

.educational-content p,
.calculator-notes p {
    line-height: 1.7;
    margin-bottom: 12px;
}

.formula-box {
    background: var(--background-light);
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
}

/* ============================================
   IMAGES
   ============================================ */
.calculator img {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 2rem auto;
    display: block;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
    .input-section,
    .user-inputs {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .calculator h3 {
        font-size: 1.1rem;
    }

    .input-section,
    .user-inputs {
        padding: 15px;
    }

    button,
    .calculator button {
        padding: 10px 30px;
        font-size: 14px;
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 576px) {
    .calculator h3 {
        font-size: 1rem;
    }

    button,
    .calculator button {
        padding: 8px 20px;
        font-size: 13px;
    }

    .input-section,
    .user-inputs {
        padding: 12px;
    }

}
