/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #444;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 24px 0;
    margin-bottom: 40px;
}

.logo {
    color: #2e7d32;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.tagline {
    color: #666;
    font-size: 14px;
    font-weight: 400;
}

/* Main Layout */
main {
    display: flex;
    gap: 30px;
    margin-bottom: 60px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.main-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 1.05rem;
    color: #666;
    line-height: 1.5;
    margin: 0 0 40px 0;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* Project Builder */
.project-builder {
    margin-bottom: 60px;
    font-size: 0; /* Remove whitespace between inline-block elements */
}

.project-builder h2 {
    font-size: 1.25rem;
    color: #1a1a1a;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Area List */
.area-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 1rem; /* Reset font-size for area list */
}

.area-card {
    background: #f9fafb;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 18px;
    position: relative;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.area-card.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.area-card-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.area-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.area-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 2px;
}

.area-field input,
.area-field select {
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    transition: all 0.15s ease;
    background: #fff;
}

.area-field input:focus,
.area-field select:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
}

.field-name {
    grid-column: span 2;
}

.field-material,
.field-shape {
    grid-column: span 1;
}

.field-dimensions-row {
    grid-column: span 2;
}

.dimensions-inputs {
    display: flex;
    gap: 10px;
}

.dim-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dim-input-group input {
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    transition: all 0.15s ease;
    background: #fff;
    width: 100%;
}

.dim-input-group input:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
}

.dim-label {
    font-size: 0.75rem;
    color: #777;
    text-align: center;
    line-height: 1.3;
}

.remove-area-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: none;
    color: #bbb;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.remove-area-btn:hover {
    color: #e53935;
}

.remove-area-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.error-message {
    display: none;
    color: #dc3545;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
    grid-column: span 2;
}

.area-card.error .error-message {
    display: block;
}

/* Add Area Button */
.add-area-btn {
    background: #fff;
    border: 2px solid #2e7d32;
    color: #2e7d32;
    padding: 13px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    display: inline-block;
    width: 30%;
    margin-right: 1.5%;
    margin-bottom: 0;
    vertical-align: top;
    box-sizing: border-box;
}

.add-area-btn:hover {
    background: #f1f8f1;
}

/* Calculate Project Button */
.calculate-project-btn {
    background: #2e7d32;
    border: none;
    color: #fff;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    letter-spacing: 0.01em;
    display: inline-block;
    width: 68.5%;
    vertical-align: top;
    box-sizing: border-box;
}

.calculate-project-btn:hover {
    background: #1b5e20;
}

/* Project Builder */
.project-builder {
    margin-bottom: 60px;
}

/* Reference Guide Inline */
.reference-guide-inline {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 60px;
}

.reference-guide-inline h2 {
    font-size: 1.25rem;
    color: #1a1a1a;
    margin-bottom: 24px;
    font-weight: 700;
}

.reference-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.reference-column h3 {
    font-size: 1.125rem;
    color: #1a1a1a;
    margin-bottom: 12px;
    font-weight: 600;
}

.reference-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.coverage-calculator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.coverage-calculator label {
    font-size: 14px;
    color: #666;
}

.coverage-calculator span {
    font-size: 14px;
    color: #666;
}

.multiplier-input {
    width: 80px;
    padding: 6px 10px;
    font-size: 0.95rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    text-align: center;
    font-weight: 600;
    color: #2e7d32;
}

.multiplier-input:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
}

.coverage-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.coverage-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.coverage-item:last-child {
    border-bottom: none;
}

.coverage-depth {
    font-weight: 500;
    color: #333;
}

.coverage-value {
    color: #666;
}

.depth-recommendations {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.depth-rec-item {
    font-size: 14px;
    color: #666;
}

.depth-rec-item strong {
    color: #333;
}

.bags-bulk-heading {
    margin-top: 24px;
}

.bags-bulk-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Results Panel */
.results-panel {
    display: none;
    background: #fff;
    border: 1.5px solid #2e7d32;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(46,125,50,0.1);
}

.results-panel.show {
    display: block;
    animation: slideIn 0.3s ease;
}

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

.results-panel h2 {
    font-size: 1.25rem;
    color: #1a1a1a;
    margin-bottom: 24px;
    font-weight: 700;
}

.materials-results {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

.material-result-block {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
}

.material-result-header {
    font-size: 1rem;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.material-result-line {
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
    line-height: 1.6;
}

.material-result-line:last-child {
    margin-bottom: 0;
}

.store-links {
    margin-left: 12px;
    font-size: 13px;
}

.store-links a {
    color: #2e7d32;
    text-decoration: none;
    margin: 0 8px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.store-links a:hover {
    text-decoration: underline;
    color: #1b5e20;
}

.material-breakdown {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.breakdown-header {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.breakdown-item {
    font-size: 13px;
    color: #666;
    padding-left: 16px;
    position: relative;
    margin-bottom: 4px;
}

.breakdown-item::before {
    content: "·";
    position: absolute;
    left: 0;
    color: #2e7d32;
    font-weight: 700;
}

.results-actions {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.action-btn {
    flex: 1;
    background: #fff;
    border: 2px solid #2e7d32;
    color: #2e7d32;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.action-btn:hover {
    background: #f1f8f1;
}

/* Ad Units */
.ad-unit {
    margin: 40px 0;
    display: none; /* Hidden until ready for ads */
}

.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    border-radius: 8px;
    color: #999;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-leaderboard .ad-placeholder {
    height: 90px;
}

.ad-sidebar {
    position: sticky;
    top: 20px;
}

.ad-sidebar .ad-placeholder {
    width: 300px;
    height: 250px;
}

.ad-bottom .ad-placeholder {
    height: 250px;
}

/* Footer */
footer {
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 24px 0;
    margin-top: 60px;
}

footer p {
    text-align: center;
    color: #666;
    font-size: 13px;
}

footer a {
    color: #2e7d32;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ===========================
   PRIVACY PAGE
   =========================== */

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.privacy-content h1 {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.privacy-content .last-updated {
    font-size: 14px;
    color: #666;
    margin: 0 0 32px 0;
}

.privacy-content .intro {
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 40px;
}

.privacy-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 40px 0 16px 0;
}

.privacy-content p {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin: 0 0 16px 0;
}

.privacy-content ul {
    margin: 0 0 24px 0;
    padding-left: 24px;
}

.privacy-content li {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 12px;
}

.privacy-content a {
    color: #2e7d32;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.15s ease;
}

.privacy-content a:hover {
    border-bottom-color: #2e7d32;
}

.privacy-content .back-link {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e8e8e8;
}

.privacy-content .back-link a {
    font-size: 16px;
    font-weight: 500;
    color: #2e7d32;
}

/* Print Styles */
@media print {
    header,
    .sidebar,
    .project-builder,
    .reference-guide-inline,
    .ad-unit,
    footer,
    .results-actions {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .main-content {
        max-width: 100%;
    }

    .results-panel {
        display: block !important;
        border: none;
        padding: 0;
    }

    .results-panel::before {
        content: "MulchCalc Project Materials — " attr(data-date);
        display: block;
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 20px;
        color: #000;
    }

    @page {
        margin: 0.75in;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    main {
        flex-direction: column;
    }

    .logo {
        font-size: 28px;
    }

    .tagline {
        font-size: 13px;
    }

    .main-content h1 {
        font-size: 1.6rem;
    }

    .page-subtitle {
        font-size: 1rem;
        margin-bottom: 32px;
    }

    .area-card {
        padding: 16px;
    }

    .area-card-content {
        grid-template-columns: 1fr;
    }

    .field-name,
    .field-material,
    .field-shape,
    .field-dimensions-row {
        grid-column: span 1;
    }

    .dimensions-inputs {
        flex-direction: column;
    }

    .remove-area-btn {
        position: static;
        width: 100%;
        margin-top: 12px;
        height: 44px;
    }

    .reference-columns {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .results-actions {
        flex-direction: column;
    }

    .ad-leaderboard .ad-placeholder {
        height: 50px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    header {
        padding: 16px 0;
    }

    .main-content h1 {
        font-size: 1.4rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
    }

    .project-builder h2,
    .reference-guide-inline h2,
    .results-panel h2 {
        font-size: 20px;
    }

    .reference-guide-inline {
        padding: 20px;
    }

    .results-panel {
        padding: 20px;
    }
}
