/* ============================================
   MESTZAKEN.NL — Calculator Page Styles
   ============================================ */

/* ===== NAV ACTIVE STATE ===== */
.nav-links a.active {
    color: var(--clr-field);
}

.nav-links a.active::after {
    width: 100%;
}


/* ===== CALCULATOR HERO ===== */
.calc-hero {
    background: var(--clr-earth-deep);
    padding: 130px 0 60px;
    position: relative;
    overflow: hidden;
}

.calc-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.calc-hero-content {
    position: relative;
    max-width: 640px;
}

.calc-hero h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: white;
    line-height: 1.15;
    margin-bottom: 16px;
}

.calc-hero h1 em {
    color: var(--clr-wheat-light);
    font-style: italic;
}

.calc-hero p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.05rem;
    line-height: 1.7;
}


/* ===== DISCLAIMER ===== */
.calc-disclaimer {
    background: rgba(74, 124, 89, 0.08);
    border: 1px solid rgba(74, 124, 89, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px 0 32px;
    position: relative;
    z-index: 2;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 0.85rem;
    color: var(--clr-field);
    line-height: 1.65;
}

.calc-disclaimer-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 1px;
}


/* ===== CALCULATOR LAYOUT ===== */
.calc-section {
    padding: 0 0 80px;
}

.calc-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}


/* ===== STEP HEADERS ===== */
.calc-step {
    margin-bottom: 32px;
}

.calc-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.calc-step-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--clr-field);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.88rem;
    flex-shrink: 0;
}

.calc-step-header h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.4rem;
    color: var(--clr-earth-deep);
    margin: 0;
}


/* ===== ANIMAL GROUPS ===== */
.animal-group {
    background: var(--clr-white);
    border-radius: 14px;
    border: 1px solid var(--clr-border);
    margin-bottom: 12px;
    overflow: hidden;
}

.animal-group-toggle {
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Outfit', sans-serif;
}

.animal-group-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--clr-earth-deep);
}

.animal-group-count {
    margin-left: 10px;
    background: rgba(74, 124, 89, 0.1);
    color: var(--clr-field);
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
}

.animal-group-count:empty {
    display: none;
}

.toggle-arrow {
    font-size: 0.8rem;
    color: var(--clr-text-muted);
    transition: transform 0.25s ease;
}

.animal-group-toggle[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
}

.animal-group-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 20px;
}

.animal-group-body.open {
    max-height: 600px;
    padding: 0 20px 16px;
}


/* ===== ANIMAL ROWS ===== */
.animal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid #F3EFE7;
    gap: 12px;
    flex-wrap: wrap;
}

.animal-info {
    flex: 1;
    min-width: 180px;
}

.animal-name {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--clr-text);
}

.animal-norm {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-top: 2px;
}

.animal-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-minus,
.btn-plus {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--clr-border);
    background: #FAFAF7;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
    color: var(--clr-text-muted);
}

.btn-plus {
    color: var(--clr-field);
}

.btn-minus:hover,
.btn-plus:hover {
    background: var(--clr-cream);
    border-color: var(--clr-field);
}

.animal-count {
    width: 72px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--clr-border);
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--clr-earth-deep);
    outline: none;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}

.animal-count::-webkit-inner-spin-button,
.animal-count::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.animal-count:focus {
    border-color: var(--clr-field);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}


/* ===== GROUND CARD ===== */
.ground-card {
    background: var(--clr-white);
    border-radius: 14px;
    border: 1px solid var(--clr-border);
    padding: 24px 20px;
}

.ground-row {
    margin-bottom: 4px;
}

.ground-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--clr-earth-deep);
    display: block;
    margin-bottom: 10px;
}

.ground-input-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.ground-input {
    width: 120px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--clr-border);
    padding: 0 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--clr-earth-deep);
    outline: none;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}

.ground-input::-webkit-inner-spin-button,
.ground-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.ground-input:focus {
    border-color: var(--clr-field);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.fosfaat-label {
    font-size: 0.78rem;
    color: var(--clr-text-muted);
    margin-bottom: 6px;
}

.fosfaat-buttons {
    display: flex;
    gap: 4px;
}

.fosfaat-btn {
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid var(--clr-border);
    background: white;
    color: var(--clr-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
}

.fosfaat-btn.active {
    border-color: var(--clr-field);
    background: var(--clr-field);
    color: white;
}

.fosfaat-btn:hover:not(.active) {
    border-color: var(--clr-field);
    color: var(--clr-field);
}

.ground-divider {
    height: 1px;
    background: #F3EFE7;
    margin: 20px 0;
}

.ground-summary {
    margin-top: 16px;
    padding: 12px 16px;
    background: #FAFAF7;
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--clr-text-muted);
}


/* ===== SUBMIT BUTTON ===== */
.calc-submit-btn {
    width: 100%;
    padding: 18px 32px;
    border-radius: 50px;
    border: none;
    background: #C8C3B8;
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: not-allowed;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.calc-submit-btn.ready {
    background: var(--clr-field);
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(74, 124, 89, 0.3);
}

.calc-submit-btn.ready:hover {
    background: var(--clr-earth);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(74, 124, 89, 0.4);
}


/* ===== SIDEBAR ===== */
.calc-sidebar {
    position: sticky;
    top: 90px;
}

.calc-sidebar-inner {
    background: var(--clr-earth-deep);
    border-radius: 16px;
    padding: 24px;
    color: white;
}

.sidebar-header {
    font-weight: 600;
    font-size: 0.95rem;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.88rem;
}

.sidebar-row span {
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-row strong {
    color: white;
    font-weight: 600;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 12px 0;
}

.text-green {
    color: var(--clr-field-light) !important;
}


/* ===== RESULTS SECTION ===== */
.calc-results {
    padding: 0 0 60px;
}

.results-card {
    background: var(--clr-earth-deep);
    border-radius: 20px;
    padding: 40px 32px;
    color: white;
    animation: resultsFadeIn 0.6s ease;
}

@keyframes resultsFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-status {
    text-align: center;
    margin-bottom: 32px;
}

.results-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

.results-status h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.6rem;
    margin: 0;
}

.results-status h3.warning { color: var(--clr-wheat-light); }
.results-status h3.success { color: var(--clr-field-light); }


/* Results table */
.results-table-wrap {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th {
    text-align: right;
    padding: 10px 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.results-table th:first-child { text-align: left; }

.results-table td {
    text-align: right;
    padding: 14px 0;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.results-table td:first-child {
    text-align: left;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.results-total-row td {
    font-weight: 700;
    font-size: 1.05rem;
    border-bottom: none;
    padding-top: 16px;
}

.text-warning { color: var(--clr-wheat-light); }
.text-success { color: var(--clr-field-light); }


/* Bars */
.results-bars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.results-bar-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 16px;
}

.results-bar-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
}

.results-bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.results-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
    width: 0%;
}

.results-bar-fill.ok {
    background: linear-gradient(90deg, #5E9E6E, #4A7C59);
}

.results-bar-fill.over {
    background: linear-gradient(90deg, #E8C56A, #C0392B);
}

.results-bar-pct {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 8px;
}


/* Detail per dier */
.results-detail {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 24px;
}

.results-detail-title {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.detail-row:last-child { border-bottom: none; }

.detail-row-label { color: rgba(255, 255, 255, 0.7); }
.detail-row-value { color: rgba(255, 255, 255, 0.9); font-weight: 500; }


/* Kosten */
.results-kosten {
    background: rgba(232, 197, 106, 0.12);
    border: 1px solid rgba(232, 197, 106, 0.25);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.results-kosten-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.results-kosten-value {
    font-family: 'DM Serif Display', serif;
    font-size: 2.2rem;
    color: var(--clr-wheat-light);
}

.results-kosten-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
    line-height: 1.5;
}


/* CTA in results */
.results-cta {
    text-align: center;
    padding-top: 16px;
}

.results-cta p {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    line-height: 1.6;
}

.results-source {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 16px;
}


/* ===== NORMEN CARD ===== */
.calc-normen {
    padding: 0 0 80px;
}

.normen-card {
    background: var(--clr-white);
    border-radius: 14px;
    border: 1px solid var(--clr-border);
    padding: 28px 24px;
}

.normen-card h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.15rem;
    color: var(--clr-earth-deep);
    margin-bottom: 16px;
}

.normen-card p {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    line-height: 1.8;
    margin-bottom: 8px;
}

.normen-warning {
    color: var(--clr-field) !important;
    font-weight: 500;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .calc-layout {
        grid-template-columns: 1fr;
    }

    .calc-sidebar {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .results-bars {
        grid-template-columns: 1fr;
    }

    .results-card {
        padding: 28px 20px;
    }

    .fosfaat-buttons {
        flex-wrap: wrap;
    }

    .ground-input-row {
        flex-direction: column;
    }
}
