/* ==========================================================================
   LN1PT Property Transfers — Frontend Styles
   ========================================================================== */

/* ---------- Wrapper ---------- */
.ln1pt-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    color: #333;
}

/* ---------- Search Bar ---------- */
.ln1pt-search-bar {
    margin-bottom: 20px;
}

.ln1pt-search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ln1pt-search-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* ---------- Filter Layout ---------- */
.ln1pt-filters-primary,
.ln1pt-filters-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.ln1pt-filter-group {
    flex: 1 1 180px;
    min-width: 150px;
}

.ln1pt-filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
}

.ln1pt-filter-date-group {
    flex: 1 1 280px;
    min-width: 260px;
}

.ln1pt-date-pair {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ln1pt-date-pair .ln1pt-flatpickr,
.ln1pt-date-pair .flatpickr-input {
    flex: 1;
    min-width: 0;
}

.ln1pt-date-separator {
    font-size: 12px;
    color: #888;
    flex-shrink: 0;
}

.ln1pt-filter-slider-group {
    flex: 1 1 250px;
    min-width: 220px;
}

.ln1pt-filter-checkbox-group {
    display: flex;
    align-items: flex-end;
    padding-bottom: 4px;
}

.ln1pt-filter-checkbox-group label {
    text-transform: none;
    font-weight: 400;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* ---------- Slider Styles ---------- */
.ln1pt-slider {
    margin-top: 10px;
    margin-bottom: 4px;
}

.ln1pt-slider-values {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* noUiSlider overrides. */
.ln1pt-wrapper .noUi-connect {
    background: #0073aa;
}

.ln1pt-wrapper .noUi-handle {
    border-radius: 50%;
    width: 18px !important;
    height: 18px !important;
    right: -9px !important;
    top: -7px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    cursor: grab;
}

.ln1pt-wrapper .noUi-handle::before,
.ln1pt-wrapper .noUi-handle::after {
    display: none;
}

/* ---------- Toggle & Clear Buttons ---------- */
.ln1pt-more-filters-toggle {
    margin-bottom: 10px;
}

.ln1pt-clear-filters {
    margin-bottom: 10px;
}

.ln1pt-btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1.4;
}

.ln1pt-btn-primary {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.ln1pt-btn-primary:hover {
    background: #005a87;
}

.ln1pt-btn-secondary {
    background: #f7f7f7;
    color: #333;
    border-color: #ccc;
}

.ln1pt-btn-secondary:hover {
    background: #e9e9e9;
}

.ln1pt-btn-link {
    background: none;
    border: 1px solid transparent;
    color: #0073aa;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}

.ln1pt-btn-link:hover {
    color: #005a87;
}

.ln1pt-toggle-icon {
    font-size: 10px;
    margin-left: 4px;
}

.ln1pt-secondary-note {
    font-size: 12px;
    color: #888;
    font-style: italic;
    margin: 0 0 10px 0;
}

/* ---------- Table ---------- */
.ln1pt-table-wrapper {
    margin-bottom: 20px;
    overflow-x: auto;
}

.ln1pt-table {
    width: 100% !important;
    border-collapse: collapse;
}

.ln1pt-table thead th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.ln1pt-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.ln1pt-table tbody tr:hover {
    background: #f0f6fc;
}

.ln1pt-col-right {
    text-align: right;
}

.ln1pt-na {
    color: #aaa;
}

.ln1pt-record-link {
    color: inherit;
    text-decoration: none;
    font-size: inherit;
}

.ln1pt-record-link:hover {
    text-decoration: underline;
}

/* DataTables 2.x overrides. */
.ln1pt-dt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}

.ln1pt-dt-bottom {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.ln1pt-wrapper .dt-info {
    padding: 0;
}

.ln1pt-wrapper .dt-length {
    padding: 0;
}

.ln1pt-wrapper .dt-length select {
    margin: 0 6px;
    min-width: 5em;
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.ln1pt-wrapper .dt-paging {
    margin: 0;
}

.ln1pt-wrapper .dt-paging button {
    padding: 4px 10px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    background: #fff;
}

.ln1pt-wrapper .dt-paging button.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.ln1pt-wrapper .dt-paging button:hover:not(.current):not(.disabled) {
    background: #f0f0f0;
    color: #333;
}

.ln1pt-wrapper .dt-paging button.disabled {
    opacity: 0.4;
    cursor: default;
}

.ln1pt-wrapper .dt-processing {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.9);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

/* ---------- Modal ---------- */
.ln1pt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 30px 15px;
    overflow-y: auto;
}

.ln1pt-modal {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    max-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.ln1pt-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.ln1pt-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.ln1pt-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0 4px;
}

.ln1pt-modal-close:hover {
    color: #333;
}

.ln1pt-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.ln1pt-modal-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.ln1pt-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.ln1pt-modal-footer .ln1pt-disclaimer-modal {
    flex-basis: 100%;
    margin-top: 8px;
    border-top: none;
    padding-top: 0;
}

/* ---------- Detail Sections (shared by modal & single page) ---------- */
.ln1pt-detail-section {
    margin-bottom: 24px;
}

.ln1pt-detail-section h2,
.ln1pt-detail-section h3 {
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #0073aa !important;
    margin: 0 0 12px 0 !important;
    padding-bottom: 6px !important;
    border-bottom: 2px solid #e8f0f6 !important;
}

.ln1pt-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px 20px;
}

.ln1pt-detail-item {
    display: flex;
    flex-direction: column;
}

.ln1pt-detail-item.ln1pt-detail-full {
    grid-column: 1 / -1;
}

.ln1pt-detail-item .ln1pt-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #888;
    margin-bottom: 2px;
}

.ln1pt-detail-item .ln1pt-value {
    font-size: 14px;
    color: #333;
    word-break: break-word;
}

/* ---------- Disclaimer ---------- */
.ln1pt-disclaimer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.ln1pt-disclaimer p {
    font-size: 12px;
    font-style: italic;
    color: #888;
    line-height: 1.5;
    margin: 0;
}

/* ---------- Single Record Page ---------- */
.ln1pt-single-wrapper {
    max-width: 1100px !important;
    margin: 30px auto !important;
    padding: 0 20px !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 40px;
    align-items: flex-start;
}

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

.ln1pt-single-sidebar {
    width: 270px;
    flex-shrink: 0;
}

.ln1pt-single-nav {
    margin-bottom: 16px;
}

.ln1pt-single-nav a {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

.ln1pt-single-nav a:hover {
    text-decoration: underline;
}

.ln1pt-single-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 0 0 24px 0 !important;
    line-height: 1.3 !important;
    color: #222 !important;
}

.ln1pt-single-subtitle {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #666;
    margin-top: 5px;
    letter-spacing: 0;
    text-transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .ln1pt-single-wrapper {
        flex-direction: column;
        gap: 24px;
    }

    .ln1pt-single-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .ln1pt-filters-primary,
    .ln1pt-filters-secondary {
        flex-direction: column;
    }

    .ln1pt-filter-group {
        flex: 1 1 100%;
    }

    .ln1pt-detail-grid {
        grid-template-columns: 1fr;
    }

    .ln1pt-modal {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }

    .ln1pt-modal-overlay {
        padding: 10px;
    }

    .ln1pt-modal-header h2 {
        font-size: 16px;
    }

    .ln1pt-dt-top {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .ln1pt-search-input {
        font-size: 14px;
        padding: 10px 12px;
    }

    .ln1pt-modal-body {
        padding: 16px;
    }

    .ln1pt-modal-footer {
        padding: 12px 16px;
    }
}

/* ---------- Select2 overrides ---------- */
.ln1pt-wrapper .select2-container--default .select2-selection--single {
    height: 36px;
    border-color: #ddd;
    border-radius: 4px;
}

.ln1pt-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 34px;
    padding-left: 10px;
    color: #333;
}

.ln1pt-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 34px;
}

.ln1pt-wrapper .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #999;
}

/* Flatpickr input. */
.ln1pt-wrapper .ln1pt-flatpickr,
.ln1pt-wrapper .flatpickr-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    height: 36px;
    box-sizing: border-box;
}
