/* CalWhat Calculator Platform - TimelapseCalculator Specific Styles */
/* This file contains calculator-specific styles only */
/* DO NOT redefine: .glass-card, .form-input, .btn-custom, .btn-sponsor */

/* Input Group */
.input-group-custom {
    margin-bottom: 12px;
}

.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: 280px;
    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: #2d3748;
    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;
    }
}

/* Mode Tabs */
.mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-tab {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    color: #4a5568;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.mode-tab:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
}

.mode-tab.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mode-tab i {
    margin-right: 8px;
}

/* Subject Preset Buttons */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.subject-btn {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.subject-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
    transform: translateY(-2px);
}

.subject-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
    box-shadow: 0 4px 12px rgba(102,126,234,0.2);
}

.subject-btn .subject-icon {
    font-size: 1.5rem;
}

.subject-btn .subject-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.85rem;
}

.subject-btn .subject-interval {
    color: #718096;
    font-size: 0.75rem;
}

/* Result Card */
.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: 1.1rem;
    font-weight: 500;
    opacity: 0.95;
    margin-bottom: 8px;
}

.result-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: pulse 0.5s ease;
}

.result-value.secondary {
    font-size: 2rem;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.result-divider {
    border: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 15px 0;
}

.result-details {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    margin-top: 15px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.result-item-value {
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
}

/* Star Mode Warning */
.star-mode-info {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 12px;
    margin-top: 15px;
    border-left: 4px solid #f59e0b;
}

.star-mode-info .star-title {
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.star-mode-info .star-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Warnings */
.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    margin-top: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.warning-box i {
    color: #856404;
    margin-right: 8px;
}

.warning-box.info {
    background: #e8f4fd;
    border-left-color: #3498db;
}

.warning-box.info i {
    color: #2980b9;
}

.warning-box.success {
    background: #d4edda;
    border-left-color: #48bb78;
}

.warning-box.success i {
    color: #38a169;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    margin: 15px 0;
}

/* Estimation Cards */
.estimation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.estimation-card {
    background: linear-gradient(135deg, rgba(102,126,234,0.08) 0%, rgba(118,75,162,0.08) 100%);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(102,126,234,0.2);
}

.estimation-card .est-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.estimation-card .est-label {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 5px;
}

.estimation-card .est-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    font-family: 'Roboto Mono', monospace;
}

.estimation-card .est-note {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .estimation-grid {
        grid-template-columns: 1fr;
    }

    .mode-tabs {
        flex-direction: column;
    }

    .subject-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-value {
        font-size: 2rem;
    }

    .result-value.secondary {
        font-size: 1.5rem;
    }
}

/* Timeline Preview */
.timeline-preview {
    margin-top: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 12px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.timeline-title {
    font-weight: 600;
    color: #2d3748;
}

.timeline-info {
    font-size: 0.85rem;
    color: #718096;
}

/* Hidden fields for mode switching */
.mode-content {
    display: none;
}

.mode-content.active {
    display: block;
}