/* CalWhat Calculator Platform - CNC Scallop Height Calculator Specific Styles */
/* ⚠️ DO NOT redefine global classes: .glass-card, .form-input, .btn-custom, .btn-sponsor */
/* Only calculator-specific styles are defined here */

/* Input Group Layout */
.input-group-custom {
    margin-bottom: 15px;
}

.input-label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    position: relative;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    font-size: 0.7rem;
    cursor: help;
    margin-left: 5px;
    position: relative;
}

.tooltip-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2d3748;
    color: white;
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: opacity 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-weight: 400;
    max-width: 250px;
    white-space: normal;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2d3748 transparent transparent transparent;
}

.input-wrapper {
    position: relative;
}

.input-range {
    font-size: 0.75rem;
    color: #718096;
    margin-top: 4px;
}

.input-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .input-row {
        grid-template-columns: 1fr;
    }
}

/* Result Card - Primary result display */
.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

@media (min-width: 992px) {
    .result-card {
        position: sticky;
        top: 20px;
    }
}

.result-main {
    text-align: center;
    padding: 20px 0;
}

.result-label {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 5px;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
    margin-bottom: 10px;
}

.result-unit {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
}

.result-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 15px 0;
}

/* Result Details Grid */
.result-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 15px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.result-item-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.result-item-value {
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
    font-size: 1rem;
}

/* Quality Grade Badge */
.quality-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 10px;
}

.quality-badge.precision {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.quality-badge.good {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.quality-badge.normal {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.quality-badge.rough {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* Scallop Visualization */
.scallop-visualization {
    margin: 20px 0;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scallop-svg {
    width: 100%;
    max-width: 500px;
    height: 280px;
    display: block;
    margin: 0 auto;
}

.scallop-label {
    font-size: 0.85rem;
    color: #4a5568;
    text-align: center;
    margin-top: 10px;
}

/* Warning Message */
.warning-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 15px;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    margin-top: 15px;
    color: #92400e;
    font-size: 0.9rem;
}

.warning-message i {
    color: #f59e0b;
    margin-top: 2px;
}

.warning-message.error {
    background: #fee2e2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.warning-message.error i {
    color: #ef4444;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 280px;
    margin: 15px 0;
}

/* Reverse Calculation Section */
.reverse-calc-section {
    background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

.reverse-calc-title {
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reverse-calc-result {
    background: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.reverse-calc-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    font-family: 'Roboto Mono', monospace;
}

/* Time Estimate Section (Optional) */
.time-estimate-section {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

.time-estimate-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #166534;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Mode Toggle Buttons */
.mode-toggle {
    display: flex;
    background: #e2e8f0;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 15px;
}

.mode-toggle-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-toggle-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Info Box */
.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 15px;
    font-size: 0.85rem;
    color: #1e40af;
}

.info-box i {
    color: #3b82f6;
    margin-right: 8px;
}

/* Formula Display */
.formula-display {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .result-value {
        font-size: 2rem;
    }

    .quality-badge {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .scallop-svg {
        height: 220px;
    }

    .scallop-visualization {
        padding: 15px 10px;
    }
}
