/* Memorial Admin Panel Styles */

/* Add Memorial Button */
#add-memorial-btn {
    display: none;
    /* Hidden by default, shown when authenticated */
    margin-bottom: 2.5rem;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, #d7263d 0%, #b01e31 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(215, 38, 61, 0.3);
    position: relative;
    overflow: hidden;
}

#add-memorial-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#add-memorial-btn:hover::before {
    left: 100%;
}

#add-memorial-btn:hover {
    background: linear-gradient(135deg, #ff2d48 0%, #d7263d 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(215, 38, 61, 0.5);
}

#add-memorial-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(215, 38, 61, 0.4);
}

/* Admin buttons on memorial cards */
.memorial-admin-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    display: flex;
    gap: 8px;
}

.btn-memorial-edit,
.btn-memorial-delete {
    display: none;
    /* Hidden by default, shown when authenticated */
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-memorial-edit:hover {
    background: linear-gradient(135deg, #1446a0 0%, #0d2f6e 100%);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 70, 160, 0.4);
}

.btn-memorial-delete:hover {
    background: linear-gradient(135deg, #d7263d 0%, #b01e31 100%);
    border-color: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(215, 38, 61, 0.4);
}

/* Modal Styles */
#memorial-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.memorial-modal-content {
    background: linear-gradient(135deg, #1a1f2e 0%, #0c0e14 100%);
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid rgba(215, 38, 61, 0.3);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#memorial-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

#memorial-modal-close:hover,
#memorial-modal-close:focus {
    color: var(--accent-red);
}

#memorial-modal-title {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Form Styles */
#memorial-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#memorial-form label {
    color: #e0e3f0;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    display: block;
}

#memorial-form input,
#memorial-form textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: white;
    font-size: 0.95rem;
}

#memorial-form input:focus,
#memorial-form textarea:focus {
    outline: none;
    border-color: var(--accent-red);
    background: rgba(255, 255, 255, 0.08);
}

#memorial-form textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

#memorial-image-preview {
    display: none;
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    margin-top: 0.5rem;
    border: 2px solid rgba(215, 38, 61, 0.3);
}

.memorial-form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.memorial-form-buttons button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.memorial-form-buttons button[type="submit"] {
    background: var(--accent-red);
    color: white;
}

.memorial-form-buttons button[type="submit"]:hover {
    background: #c32a3d;
    transform: translateY(-2px);
}

.memorial-form-buttons button[type="button"] {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e3f0;
}

.memorial-form-buttons button[type="button"]:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Required field indicator */
#memorial-form label.required::after {
    content: " *";
    color: var(--accent-red);
}

/* Responsive */
@media (max-width: 768px) {
    .memorial-modal-content {
        margin: 10% 5%;
        padding: 1.5rem;
        width: calc(100% - 10%);
    }

    .memorial-admin-buttons {
        top: 5px;
        right: 5px;
        gap: 4px;
    }

    .btn-memorial-edit,
    .btn-memorial-delete {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}