/* SpringRateCalculator.css - Calculator-specific styles only */
/* DO NOT redefine global classes like .glass-card, .form-input, .btn-custom, etc. */

/* Result card styling */
.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.result-main {
    text-align: center;
    padding: 20px 0;
}

.result-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.result-value {
    color: white;
    font-size: 2.8rem;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
}

.result-unit {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
}

.result-divider {
    border-color: rgba(255, 255, 255, 0.3);
    margin: 15px 0;
}

.result-details {
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-top: 15px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.result-item-value {
    color: white;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
}

/* Input group styling */
.input-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 576px) {
    .input-row {
        grid-template-columns: 1fr;
    }
}

.input-group-custom {
    display: flex;
    flex-direction: column;
}

.input-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-label i {
    color: #667eea;
}

.input-wrapper {
    position: relative;
}

.input-range {
    font-size: 0.75rem;
    color: #718096;
    margin-top: 4px;
}

/* Tooltip styling */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #e2e8f0;
    color: #4a5568;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: help;
    position: relative;
    margin-left: 5px;
}

.tooltip-icon .tooltip-text {
    visibility: hidden;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: nowrap;
    max-width: 250px;
    white-space: normal;
    opacity: 0;
    transition: opacity 0.2s;
}

.tooltip-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Spring Index Warning */
.warning-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.warning-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.warning-badge.danger {
    background: #f8d7da;
    color: #721c24;
}

.warning-badge.success {
    background: #d4edda;
    color: #155724;
}

/* Safety check section */
.safety-checks {
    margin-top: 15px;
}

.safety-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    margin-bottom: 8px;
}

.safety-item:last-child {
    margin-bottom: 0;
}

.safety-item.safe {
    border-left: 3px solid #48bb78;
}

.safety-item.warning {
    border-left: 3px solid #ecc94b;
}

.safety-item.danger {
    border-left: 3px solid #f56565;
}

.safety-item i {
    font-size: 1rem;
}

.safety-item.safe i {
    color: #48bb78;
}

.safety-item.warning i {
    color: #ecc94b;
}

.safety-item.danger i {
    color: #f56565;
}

.safety-item span {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.85rem;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
    padding: 10px;
}

/* Deflection slider styling */
.deflection-slider-container {
    padding: 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 12px;
    margin-top: 15px;
}

.deflection-slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.deflection-slider-label span {
    font-weight: 500;
    color: #2d3748;
}

.deflection-value {
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    color: #667eea;
}

.deflection-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.deflection-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s;
}

.deflection-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.deflection-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

/* Force result display */
.force-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-top: 15px;
}

.force-result-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.force-result-value {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
}

/* Unit selector */
.unit-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.unit-btn {
    padding: 6px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #4a5568;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.unit-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.unit-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Material info display */
.material-info {
    padding: 10px 15px;
    background: #f7fafc;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #4a5568;
}

.material-info strong {
    color: #2d3748;
}

/* Spring visualization placeholder */
.spring-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    min-height: 150px;
}

.spring-visual-placeholder {
    color: #a0aec0;
    font-size: 0.9rem;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .result-value {
        font-size: 2.2rem;
    }

    .force-result-value {
        font-size: 1.5rem;
    }

    .chart-container {
        height: 250px;
    }

    .unit-selector {
        flex-wrap: wrap;
    }

    .unit-btn {
        flex: 1;
        min-width: calc(33% - 6px);
        text-align: center;
    }
}

/* Die Spring Section Styles */
.die-spring-section {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
    border-radius: 12px;
    border: 1px dashed rgba(255, 152, 0, 0.4);
}

.die-spring-header {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e65100;
    margin-bottom: 15px;
}

.die-spring-header i {
    margin-right: 6px;
}

.die-spring-info {
    padding: 10px 15px;
    background: rgba(255, 152, 0, 0.15);
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.85rem;
    color: #e65100;
}

.die-spring-info i {
    margin-right: 6px;
}

/* Readonly input styling when die spring is selected */
.readonly-input {
    background-color: #f0f0f0 !important;
    color: #666 !important;
    cursor: not-allowed;
}

/* Die spring color legend */
.die-spring-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.die-spring-color-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #555;
}

/* Mobile responsive for die spring section */
@media (max-width: 576px) {
    .die-spring-section .input-row {
        flex-direction: column;
    }

    .die-spring-section .input-group-custom {
        width: 100%;
    }
}
