/* Memorial Frontend Styles */

/* Page-level spacing to prevent fixed header overlap */
.memorial-page-content {
    padding-top: 20px;
}

/* Section Headers */
.memorial-section-title {
    font-size: 1.5em;
    color: #333;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #c41230;
}

.memorial-section-title:first-of-type {
    margin-top: 20px;
}

/* Memorial Listing Grid */
.memorial-listing {
    max-width: 1200px;
    margin: 0 auto;
    clear: both;
}

.memorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

.memorial-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease;
}

.memorial-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.memorial-card .memorial-name {
    margin: 0 0 10px 0;
    font-size: 1.25em;
}

.memorial-card .memorial-name a {
    color: #333;
    text-decoration: none;
}

.memorial-card .memorial-name a:hover {
    color: #0073aa;
}

.memorial-card .memorial-class {
    color: #666;
    margin: 5px 0;
    font-style: italic;
}

.memorial-card .memorial-date {
    color: #888;
    font-size: 0.9em;
    margin: 5px 0;
}

.memorial-card .memorial-links {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
}

.memorial-card .memorial-links a {
    color: #0073aa;
    text-decoration: none;
}

.memorial-card .memorial-links a:hover {
    text-decoration: underline;
}

.memorial-card .memorial-memories {
    margin-top: 10px;
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

/* Memorial Pagination */
.memorial-pagination {
    margin-top: 30px;
    text-align: center;
}

.memorial-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.memorial-pagination .page-numbers.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.memorial-pagination .page-numbers:hover:not(.current) {
    background: #e5e5e5;
}

/* Single Memorial Page */
.memorial-header {
    text-align: center;
    margin-bottom: 30px;
}

/* Edit Memorial Link - styled for post meta line */
.memorial-edit-link {
    display: none; /* Hidden until moved by JS */
    font-size: inherit;
    color: #666;
    text-decoration: none;
}

.memorial-edit-link:hover {
    color: #006B7D;
    text-decoration: underline;
}

.memorial-edit-link .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 2px;
}

.memorial-photo {
    display: inline-block;
    margin-bottom: 20px;
}

.memorial-photo img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f0f0f0;
}

.memorial-class-year {
    font-size: 1.2em;
    color: #555;
    font-style: italic;
    margin: 15px 0;
}

.memorial-death-date {
    color: #666;
    margin: 10px 0;
}

.memorial-obituary-link {
    margin: 20px 0;
}

.memorial-obituary-link a {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.2s ease;
}

.memorial-obituary-link a:hover {
    background: #005a87;
}

.memorial-divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 30px 0;
}

/* Additional Links Section */
.memorial-additional-links {
    margin: 20px 0;
    padding: 15px 20px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid #0073aa;
}

.memorial-additional-links p {
    margin: 0 0 10px 0;
}

.memorial-additional-links ul {
    margin: 0;
    padding-left: 20px;
}

.memorial-additional-links li {
    margin: 5px 0;
}

.memorial-additional-links a {
    color: #0073aa;
    text-decoration: none;
}

.memorial-additional-links a:hover {
    text-decoration: underline;
}

.memorial-memories-intro {
    color: #666;
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 30px;
}

/* Recent Memorials Widget/Shortcode */
.memorial-recent ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.memorial-recent li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.memorial-recent li:last-child {
    border-bottom: none;
}

.memorial-recent a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.memorial-recent a:hover {
    color: #0073aa;
}

.memorial-recent .class-year {
    color: #888;
    font-size: 0.9em;
    margin-left: 5px;
}

/* Comment Form Styling for Memorials */
.post-type-memorial .comment-form-comment label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.post-type-memorial .comment-form-comment textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.post-type-memorial .form-submit input[type="submit"] {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.post-type-memorial .form-submit input[type="submit"]:hover {
    background: #005a87;
}

.post-type-memorial .must-log-in {
    background: #f9f9f9;
    padding: 15px 20px;
    border-left: 4px solid #0073aa;
    margin: 20px 0;
}

/* Comment List Styling */
.post-type-memorial .comment-list {
    list-style: none;
    padding: 0;
}

.post-type-memorial .comment {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.post-type-memorial .comment-author {
    font-weight: bold;
    margin-bottom: 5px;
}

.post-type-memorial .comment-meta {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 10px;
}

.post-type-memorial .comment-content {
    line-height: 1.6;
}

/* Class Year Search Box */
.memorial-search {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0 30px 0;
    border: 1px solid #e0e0e0;
}

.memorial-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.memorial-search label {
    font-weight: bold;
    color: #333;
}

.memorial-search-input {
    padding: 10px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    min-width: 200px;
}

.memorial-search-input:focus {
    outline: none;
    border-color: #c41230;
    box-shadow: 0 0 3px rgba(196, 18, 48, 0.3);
}

.memorial-search-btn {
    padding: 10px 20px;
    background: #c41230;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.memorial-search-btn:hover {
    background: #a00f28;
}

.memorial-search-clear {
    padding: 10px 15px;
    background: #666;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}

.memorial-search-clear:hover {
    background: #555;
    color: white;
}

/* Class Year Filter Dropdown */
.memorial-class-filter {
    margin: 20px 0 30px 0;
}

.memorial-class-filter label {
    margin-right: 10px;
    font-weight: bold;
    color: #333;
}

.memorial-class-filter select {
    padding: 10px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

/* Memorials By Class Year Grid */
.memorial-by-year {
    max-width: 1200px;
    margin: 0 auto;
}

.memorial-year-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.memorial-year-header {
    background: #c41230;
    color: white;
    padding: 12px 20px;
    font-size: 1.2em;
    font-weight: bold;
}

.memorial-year-header .count {
    font-weight: normal;
    font-size: 0.85em;
    opacity: 0.9;
}

.memorial-year-list {
    padding: 15px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.memorial-year-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.memorial-year-item a {
    color: #333;
    text-decoration: none;
}

.memorial-year-item a:hover {
    color: #c41230;
}

.memorial-year-item .has-obit {
    font-size: 0.8em;
    color: #0073aa;
    margin-left: 5px;
}

/* Empty year box */
.memorial-year-empty {
    padding: 15px 20px;
    color: #888;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .memorial-grid {
        grid-template-columns: 1fr;
    }

    .memorial-card {
        padding: 15px;
    }

    .memorial-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .memorial-search-input {
        min-width: auto;
        width: 100%;
    }

    .memorial-year-list {
        grid-template-columns: 1fr;
    }
}
