/* Acreage Report page */

.acreage-report {
    /* max-width: 1200px; -- let's not constrain it to 1200px on desktop */
    margin: 20px auto 40px;
}

.acreage-card {
    border: 1px solid #d4d4d4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    background: #fff;
}

.acreage-card > .card-body {
    padding: 2.5rem;
}

.acreage-header {
    border-bottom: 2px solid #333;
    padding-bottom: 1rem;
    margin-bottom: 1.75rem;
}

.acreage-title {
    margin: 0;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.acreage-subtitle {
    margin: 0.35rem 0 0;
    letter-spacing: 0.03em;
}

.acreage-member-info {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.acreage-table {
    min-width: 900px;
    margin-bottom: 0;
}

.acreage-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 2px solid #333;
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f8f9fa;
    box-shadow: 0 2px 0 0 #333;
}

/* .table-responsive computes to overflow-y: auto, which traps sticky inside the wrapper.
   On wide screens the table fits at min-width:900px, so we disable clipping and let the
   viewport be the scroll context. Small screens keep horizontal scroll. */
@media (min-width: 992px) {
    .acreage-card .table-responsive {
        overflow: visible;
    }
}

.acreage-table tfoot td {
    border-top: 2px solid #333;
}

.acreage-table td,
.acreage-table th {
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
}

.acreage-table .form-control,
.acreage-table .form-control-sm {
    display: inline-block;
    min-width: 90px;
}

.acreage-table .action-col {
    width: 60px;
    text-align: center;
}

#acreageForm .form-control:focus {
    border-color: #8a4a48;
    box-shadow: 0 0 0 0.2rem rgba(84, 30, 28, 0.15);
}

.acreage-add-farm {
    margin-top: 1rem;
}

/* Blue variant of the site's standard button, for non-final acreage actions. */
.m-standard-button--blue {
    background: #004380;
    border-color: #003366;
}

    .m-standard-button--blue:hover,
    .m-standard-button--blue:focus {
        background: #003366;
        border-color: #003366;
        color: #fff;
    }

.acreage-comments {
    margin-top: 2.5rem;
}

.acreage-comments h5 {
    margin-bottom: 1rem;
}

.comments-list {
    margin-top: 1.25rem;
}

.comment-card {
    border-left: 4px solid #541e1c;
    margin-bottom: 0.75rem;
}

.comment-card .card-body {
    padding: 1rem 1.25rem;
}

.comment-body {
    margin-bottom: 0.25rem;
    white-space: pre-wrap;
}

.acreage-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
}

.acreage-last-saved {
    margin-top: 0.75rem;
}

@media (max-width: 576px) {
    .acreage-card > .card-body {
        padding: 1.25rem;
    }

    .acreage-report {
        margin: 10px auto 20px;
    }

    .acreage-header {
        margin-bottom: 1.25rem;
    }
}

@media print {
    .acreage-add-farm,
    .acreage-actions,
    .action-col,
    .delete-farm-btn,
    .delete-comment-btn,
    .comment-composer {
        display: none !important;
    }

    .acreage-card {
        border: none;
        box-shadow: none;
    }

    .acreage-card > .card-body {
        padding: 0;
    }

    .acreage-table {
        min-width: 0;
    }
}
