/* --- Formulário compacto (páginas relacionadas ao memorial) --- */
.memorial-search-compact {
    margin: 16px 0 0;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #d4c4a8;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(93, 64, 55, 0.08);
}

.memorial-search-compact-label {
    display: block;
    font-size: 0.9em;
    font-weight: 600;
    color: #5d4037;
    margin-bottom: 8px;
    text-align: center;
}

.memorial-search-compact-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.memorial-search-compact-row input[type="search"],
.memorial-search-compact-row input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.memorial-search-compact-row button {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 0.95em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: #3a5a40;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.memorial-search-compact-row button:hover {
    background: #2d4632;
}

.memorial-search-compact-hint {
    margin: 8px 0 0;
    font-size: 0.78em;
    color: #8d6e63;
    text-align: center;
    line-height: 1.35;
}

/* --- Busca local do mês (oficio.php) --- */
.memorial-search-month-local .oficio-search-clear {
    flex-shrink: 0;
    padding: 10px 14px;
    font-size: 0.95em;
    font-weight: 600;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #f5f5f5;
    color: #444;
    cursor: pointer;
    white-space: nowrap;
}

.memorial-search-month-local .oficio-search-clear:hover {
    background: #ebebeb;
}

.oficio-search-status {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e8dfd0;
    text-align: center;
}

.oficio-search-count {
    margin: 0;
    font-size: 0.88em;
    color: #5d4037;
    font-style: italic;
}

.oficio-search-no-results {
    margin: 0 0 8px;
    font-size: 0.88em;
    color: #8d6e63;
    font-style: italic;
}

.oficio-search-full-link {
    margin: 0;
    font-size: 0.88em;
}

.oficio-search-full-link a {
    color: #3a5a40;
    font-weight: 600;
}

.memorial-names-container .name-container.hidden-by-oficio-search,
.memorial-names-container .name-container[hidden] {
    display: none !important;
}

.oficio-day-block.hidden-by-oficio-search {
    display: none !important;
}

/* Destaque do sobrenome/nome correspondente (mantém estilo de lápide) */
.memorial-names-container .name-container .name-part.name-part-matched {
    color: #f5e6a8 !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85), 0 0 10px rgba(212, 175, 90, 0.45) !important;
}

.monthly-memorial-section.oficio-search-active .offering-invitation,
.monthly-memorial-section.oficio-search-active .flower-limit-notice {
    display: none;
}

/* --- Formulário completo (df.php) --- */
.df-search-box {
    margin: 20px auto 30px;
    padding: 20px;
    max-width: 600px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    scroll-margin-top: 120px;
}

.df-search-box label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.df-search-box input[type="text"],
.df-search-box input[type="search"] {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.df-search-hint {
    margin: 10px auto 0;
    max-width: 520px;
    font-size: 0.85em;
    color: #666;
    line-height: 1.4;
}

.df-search-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    margin-top: 12px;
}

.df-search-actions button {
    flex: 1 1 0;
    max-width: 180px;
    margin: 0;
    padding: 10px 16px;
    font-size: 1em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.df-search-box .btn-search {
    background: #007bff;
    color: #fff;
}

.df-search-box .btn-search:hover {
    background: #0056b3;
}

.df-search-box .btn-clear {
    background: #6c757d;
    color: #fff;
}

.df-search-box .btn-clear:hover {
    background: #545b62;
}

#df-memorial-intro.hidden-by-search {
    display: none;
}

/* --- Resultados e navegação (df.php) --- */
.df-search-box .memorial-search-back-bar {
    display: none;
    margin: 14px auto 0;
    max-width: 400px;
    padding: 0;
}

.df-search-box .memorial-search-back-bar.visible {
    display: block;
}

.df-search-box .memorial-search-back-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: #f5f5f0;
    border: 1px solid #d4c4a8;
    border-radius: 8px;
    color: #5d4037;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
}

.df-search-box .memorial-search-back-bar a:hover {
    background: #ebe8df;
}

.df-search-results {
    display: none;
    margin-top: 10px;
}

.df-search-results.active {
    display: block;
}

.df-search-results h2 {
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 1.5em;
    color: #333;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

.df-search-count {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 15px;
    font-style: italic;
}

.df-search-result-item {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #f9f9f9;
    border-left: 3px solid #007bff;
    line-height: 1.5;
}

.df-search-result-item .result-month {
    font-weight: bold;
    color: #333;
}

.df-search-result-item .result-day {
    color: #555;
}

.df-search-result-item .result-name {
    color: #444;
}

.df-list-section.hidden-by-search,
.month-links-df.hidden-by-search {
    display: none;
}

.df-no-results {
    color: #888;
    font-style: italic;
    padding: 20px 0;
}

@media (max-width: 600px) {
    .memorial-search-compact-row {
        flex-direction: column;
    }

    .memorial-search-compact-row button {
        width: 100%;
        padding: 12px;
    }

    .df-search-box input[type="text"],
    .df-search-box input[type="search"] {
        max-width: none;
    }
}
