/* Parish Records Frontend Styles */

.pr-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
}

/* ---- SEARCH BAR ---- */

.pr-search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    padding: 16px 20px;
    background: #f5f1eb;
    border: 1px solid #d4c9b8;
    border-radius: 6px;
    margin-bottom: 20px;
}

.pr-search-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pr-search-field label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #665;
}

.pr-search-field select,
.pr-search-field input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #c5b9a8;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    min-width: 180px;
}

.pr-search-field select:focus,
.pr-search-field input[type="text"]:focus {
    outline: none;
    border-color: #8b7355;
    box-shadow: 0 0 0 2px rgba(139, 115, 85, 0.2);
}

.pr-search-btn-wrap {
    flex-direction: row !important;
    gap: 8px !important;
    align-items: flex-end;
}

.pr-btn {
    padding: 8px 20px;
    border: 1px solid #8b7355;
    border-radius: 4px;
    background: #8b7355;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.pr-btn:hover {
    background: #75603f;
}

.pr-btn-secondary {
    background: #fff;
    color: #665;
    border-color: #c5b9a8;
}

.pr-btn-secondary:hover {
    background: #f5f1eb;
}

/* ---- RESULTS TABLE ---- */

.pr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pr-table thead th {
    background: #665544;
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pr-table tbody tr {
    border-bottom: 1px solid #e5ddd2;
}

.pr-table tbody tr:hover {
    background: #faf7f2;
}

.pr-table tbody td {
    padding: 10px 12px;
}

.pr-view-link {
    color: #8b7355;
    text-decoration: none;
    font-weight: 600;
}

.pr-view-link:hover {
    color: #5a4530;
    text-decoration: underline;
}

/* ---- PAGINATION ---- */

.pr-pagination {
    margin-top: 16px;
    text-align: centre;
}

.pr-pagination-inner {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: centre;
}

.pr-page-link {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #d4c9b8;
    border-radius: 4px;
    text-decoration: none;
    color: #665;
    font-size: 13px;
    background: #fff;
}

.pr-page-link:hover {
    background: #f5f1eb;
    color: #333;
}

.pr-page-active {
    background: #8b7355 !important;
    color: #fff !important;
    border-color: #8b7355 !important;
}

.pr-result-count {
    margin-top: 8px;
    font-size: 13px;
    color: #888;
    text-align: centre;
}

.pr-loading {
    padding: 40px;
    text-align: centre;
    color: #888;
    font-style: italic;
}

/* ---- DETAIL VIEW ---- */

#pr-detail {
    margin-top: 10px;
}

#pr-back-btn {
    margin-bottom: 16px;
}

.pr-detail-layout {
    display: flex;
    gap: 24px;
    border: 1px solid #d4c9b8;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.pr-detail-info {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 20px;
    background: #f5f1eb;
    border-right: 1px solid #d4c9b8;
}

.pr-detail-info h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: #443;
    border-bottom: 2px solid #c5b9a8;
    padding-bottom: 10px;
}

.pr-detail-info dl {
    margin: 0;
}

.pr-detail-info dt {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #998;
    margin-top: 12px;
}

.pr-detail-info dt:first-child {
    margin-top: 0;
}

.pr-detail-info dd {
    margin: 2px 0 0 0;
    font-size: 15px;
    color: #333;
}

.pr-detail-image {
    flex: 1;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: centre;
}

#pr-detail-image-wrap {
    width: 100%;
    text-align: centre;
}

#pr-detail-image-wrap img {
    max-width: 100%;
    height: auto;
    border: 1px solid #d4c9b8;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pr-image-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
    font-style: italic;
}

/* Image protection overlay */
.pr-image-protected {
    position: relative;
    display: inline-block;
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
}

.pr-image-protected img {
    max-width: 100%;
    height: auto;
    border: 1px solid #d4c9b8;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.pr-image-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10;
    cursor: default;
}

/* Pagination extras */
.pr-page-dots {
    display: inline-block;
    padding: 6px 4px;
    color: #999;
    font-size: 14px;
}

.pr-page-prev,
.pr-page-next {
    font-weight: 600;
}

/* Per-page selector */
.pr-perpage-wrap {
    flex-direction: row !important;
    gap: 6px !important;
    align-items: center !important;
    margin-left: auto;
}

.pr-perpage-wrap select {
    padding: 8px 10px;
    border: 1px solid #c5b9a8;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    min-width: auto;
}

.pr-no-image {
    padding: 60px 20px;
    color: #999;
    font-style: italic;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
    .pr-search-bar {
        flex-direction: column;
    }

    .pr-search-field select,
    .pr-search-field input[type="text"] {
        min-width: 100%;
    }

    .pr-detail-layout {
        flex-direction: column;
    }

    .pr-detail-info {
        flex: none;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid #d4c9b8;
    }

    .pr-table {
        font-size: 12px;
    }

    .pr-table thead th,
    .pr-table tbody td {
        padding: 8px 6px;
    }
}
