/* ============================================
   INSIGHT WERT - CALCULATOR STYLES
   Shared styles for Ad Waste Calculator
   ============================================ */

/* Calculator Page Hero */
.calc-hero {
    background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 100%);
    color: white;
    padding: calc(80px + 3rem) 0 5rem;
    text-align: center;
}

.calc-hero h1 {
    color: white;
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.calc-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Calculator Wrapper */
.iw-calculator-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 800px;
    margin: -3rem auto 0;
    padding: 0 1.5rem 3rem;
    color: #1E293B;
    line-height: 1.6;
    box-sizing: border-box;
}

.iw-calculator-wrapper * {
    box-sizing: border-box;
}

.iw-calculator-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.iw-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1E3A5F;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #E2E8F0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.iw-form-group {
    margin-bottom: 1.5rem;
}

.iw-form-group label {
    display: block;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.iw-form-group input,
.iw-form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #F8FAFC;
}

.iw-form-group input:focus,
.iw-form-group select:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: white;
}

.iw-input-hint {
    font-size: 0.8125rem;
    color: #64748B;
    margin-top: 0.375rem;
}

/* Industry Pre-fill Badges */
.iw-prefill-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #DBEAFE;
    color: #1E40AF;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    vertical-align: middle;
}

/* Industry Note Styling */
#iw-industry-note {
    font-style: italic;
    color: #475569;
}

/* Industry Dropdown Icon */
#iw-industry {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232563EB' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    padding-left: 40px;
}

.iw-calculate-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    font-family: inherit;
}

.iw-calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
}

/* Results Section */
.iw-results {
    display: none;
    animation: iwFadeIn 0.5s ease;
}

@keyframes iwFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.iw-results.visible {
    display: block;
}

.iw-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
    .iw-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.iw-metric-card {
    background: #F8FAFC;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid #E2E8F0;
}

.iw-metric-card.danger {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    border-color: #FECACA;
}

.iw-metric-label {
    font-size: 0.8125rem;
    color: #64748B;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.iw-metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1E3A5F;
}

.iw-metric-card.danger .iw-metric-value {
    color: #DC2626;
}

.iw-warning-box {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-left: 4px solid #F59E0B;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.iw-warning-box strong {
    color: #B45309;
}

.iw-chart-container {
    background: #F8FAFC;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.iw-chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 1.25rem;
}

.iw-donut-chart {
    width: 180px;
    height: 180px;
    margin: 0 auto 1.25rem;
    position: relative;
}

.iw-donut-chart svg {
    transform: rotate(-90deg);
}

.iw-chart-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.iw-chart-center-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #DC2626;
}

.iw-chart-center-label {
    font-size: 0.75rem;
    color: #64748B;
}

.iw-chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.iw-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #475569;
}

.iw-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.iw-legend-dot.effective {
    background: #2563EB;
}

.iw-legend-dot.wasted {
    background: #DC2626;
}

.iw-opportunity-box {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #6EE7B7;
}

.iw-opportunity-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #065F46;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.iw-opportunity-value {
    font-size: 2rem;
    font-weight: 700;
    color: #047857;
}

.iw-opportunity-desc {
    color: #059669;
    margin-top: 0.5rem;
    font-size: 0.9375rem;
}

/* Lead Form */
.iw-lead-form {
    background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 100%);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    margin-bottom: 1.5rem;
}

.iw-lead-form h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: white;
}

.iw-lead-form p {
    opacity: 0.9;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
}

.iw-lead-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (max-width: 500px) {
    .iw-lead-form-grid {
        grid-template-columns: 1fr;
    }
}

.iw-lead-form input[type="text"],
.iw-lead-form input[type="email"] {
    padding: 0.875rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
}

.iw-lead-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.iw-lead-form input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.iw-submit-btn {
    width: 100%;
    padding: 1rem;
    background: #22C55E;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.iw-submit-btn:hover {
    background: #16A34A;
    transform: translateY(-2px);
}

.iw-submit-btn:disabled {
    background: #94A3B8;
    cursor: not-allowed;
    transform: none;
}

.iw-form-note {
    font-size: 0.8125rem;
    opacity: 0.8;
    margin-top: 0.75rem;
    text-align: center;
}

.iw-success-message {
    display: none;
    background: #D1FAE5;
    color: #065F46;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
}

.iw-success-message.visible {
    display: block;
    animation: iwFadeIn 0.3s ease;
}

.iw-error-message {
    display: none;
    background: #FEE2E2;
    color: #DC2626;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
}

.iw-error-message.visible {
    display: block;
    animation: iwFadeIn 0.3s ease;
}

/* Social Share */
.iw-social-share {
    text-align: center;
    padding: 1.5rem;
    background: #F8FAFC;
    border-radius: 12px;
}

.iw-social-share p {
    margin-bottom: 1rem;
    color: #475569;
    font-size: 0.9375rem;
}

.iw-share-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.iw-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9375rem;
    font-family: inherit;
}

.iw-share-btn.linkedin {
    background: #0077B5;
    color: white;
}

.iw-share-btn.linkedin:hover {
    background: #006097;
    transform: translateY(-2px);
}

.iw-share-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.iw-share-btn.twitter:hover {
    background: #0D8BD9;
    transform: translateY(-2px);
}

.iw-share-btn.copy {
    background: #64748B;
    color: white;
}

.iw-share-btn.copy:hover {
    background: #475569;
    transform: translateY(-2px);
}

/* Tooltip */
.iw-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.iw-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #E2E8F0;
    border-radius: 50%;
    font-size: 0.75rem;
    color: #475569;
    margin-left: 0.375rem;
}

.iw-tooltip-text {
    visibility: hidden;
    width: 240px;
    background: #1E3A5F;
    color: white;
    text-align: left;
    border-radius: 8px;
    padding: 0.75rem;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
}

.iw-tooltip:hover .iw-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Spinner */
.iw-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: iwSpin 0.8s linear infinite;
    margin-right: 0.5rem;
}

@keyframes iwSpin {
    to {
        transform: rotate(360deg);
    }
}
