/* Lead Quality Calculator - Main Styles */

:root {
    --lqc-primary: #159a9c;
    --lqc-primary-dark: #138385;
    --lqc-accent: #bde038;
    --lqc-dark: #07282B;
    --lqc-light: #f7faf6;
    --lqc-heading: #07282B;
}

.lqc-calculator-wrapper {
    display: block;
    margin: 30px 0;
}

.lqc-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.lqc-form-section {
    max-width: 700px;
    margin: 0 auto;
}

.lqc-results-section {
    max-width: 900px;
    margin: 40px auto 0;
}

.lqc-card h2 {
    font-size: 1.5em;
    color: var(--lqc-heading);
    margin-bottom: 20px;
}

.lqc-calculator-form {
    display: block;
}

.lqc-form-group {
    margin-bottom: 20px;
}

.lqc-form-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--lqc-heading);
    margin-bottom: 8px;
    font-size: 0.95em;
}

.lqc-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--lqc-primary);
    color: white;
    font-size: 0.75em;
    font-weight: bold;
    cursor: help;
    margin-left: 6px;
    position: relative;
    flex-shrink: 0;
}

.lqc-help-icon:hover::after {
    content: attr(data-help);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--lqc-dark);
    color: white;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: normal;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lqc-help-icon:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--lqc-dark);
    z-index: 1000;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: var(--lqc-primary);
    box-shadow: 0 0 0 3px rgba(21, 154, 156, 0.1);
}

.lqc-mode-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
}

.lqc-mode-btn,
.lqc-bench-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    font-size: 0.9em;
}

.lqc-mode-btn.active,
.lqc-bench-btn.active {
    background: var(--lqc-primary);
    color: white;
    border-color: var(--lqc-primary);
}

.lqc-mode-btn:hover,
.lqc-bench-btn:hover {
    border-color: var(--lqc-primary);
}

.lqc-lockup-field {
    display: none;
}

.lqc-lockup-field.active {
    display: block;
}

.lqc-benchmark-options {
    display: none;
}

.lqc-benchmark-options.active {
    display: block;
}

.lqc-calculate-btn {
    width: 100%;
    padding: 14px;
    background: var(--lqc-accent);
    color: var(--lqc-dark);
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 20px;
}

.lqc-calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(189, 224, 56, 0.4);
}

.lqc-calculate-btn:active {
    transform: translateY(0);
}

.lqc-calculate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lqc-loading {
    display: none;
    text-align: center;
    color: var(--lqc-primary);
    margin-top: 10px;
}

.lqc-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--lqc-primary);
    border-radius: 50%;
    animation: lqc-spin 1s linear infinite;
}

@keyframes lqc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lqc-error {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: none;
}

.lqc-error.active {
    display: block;
}

.lqc-results-section {
    display: none;
    animation: lqc-slideIn 0.5s ease-out;
}

.lqc-results-section.active {
    display: block;
}

@keyframes lqc-slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lqc-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.lqc-metric-card {
    background: var(--lqc-light);
    padding: 18px;
    border-radius: 8px;
    border-left: 4px solid var(--lqc-primary);
}

.lqc-metric-card.lqc-money {
    border-left-color: var(--lqc-accent);
}

.lqc-metric-card.lqc-capital {
    border-left-color: #FFB74D;
}

.lqc-metric-card.lqc-warning {
    border-left-color: #EF5350;
}

.lqc-metric-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.lqc-metric-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.lqc-metric-value {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--lqc-heading);
    margin-bottom: 5px;
}

.lqc-metric-description {
    font-size: 0.85em;
    color: #999;
    line-height: 1.4;
}

.lqc-comparison-section {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.lqc-comparison-header {
    font-weight: 600;
    color: var(--lqc-heading);
    margin-bottom: 15px;
}

.lqc-comparison-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.lqc-comparison-item {
    flex: 1;
}

.lqc-comparison-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.lqc-bar {
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: white;
    font-weight: 600;
    font-size: 0.85em;
}

.lqc-bar-current {
    background: #EF5350;
}

.lqc-bar-optimized {
    background: var(--lqc-primary);
}

.lqc-bar-saved {
    background: var(--lqc-accent);
    color: var(--lqc-dark);
}

.lqc-recommendation-section {
    background: #EAF7F0;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px solid var(--lqc-primary);
}

.lqc-recommendation-header {
    font-weight: 600;
    color: var(--lqc-primary);
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lqc-toggle-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    transition: transform 0.3s;
}

.lqc-recommendation-section.lqc-collapsed .lqc-toggle-icon {
    transform: rotate(-90deg);
}

.lqc-recommendation-content {
    display: none;
    margin-top: 15px;
    font-size: 0.95em;
    line-height: 1.6;
    color: var(--lqc-heading);
}

.lqc-recommendation-content.active {
    display: block;
}

.lqc-recommendation-content ul {
    margin-left: 20px;
    margin-top: 10px;
}

.lqc-recommendation-content li {
    margin-bottom: 8px;
}

.lqc-save-results-wrapper {
    margin-top: 25px;
    text-align: center;
}

.lqc-save-results-btn {
    background: var(--lqc-primary);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lqc-save-results-btn:hover {
    background: var(--lqc-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(21, 154, 156, 0.4);
}

.lqc-save-results-btn:active {
    transform: translateY(0);
}

.lqc-save-results-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lqc-calculator-wrapper {
        grid-template-columns: 1fr;
    }

    .lqc-results-grid {
        grid-template-columns: 1fr;
    }

    .lqc-comparison-bar {
        flex-direction: column;
    }

    .lqc-card {
        padding: 20px;
    }
}
