.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    background: white;
    color: #6b7280;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.like-btn:hover:not(:disabled) {
    border-color: #c41e3a;
    color: #c41e3a;
}

.like-btn.liked {
    background: #fef2f2;
    border-color: #c41e3a;
    color: #c41e3a;
}

.like-btn:disabled {
    cursor: default;
}

.like-btn i {
    font-size: 1rem;
}

.message-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-footer-left {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.condolence-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.condolence-lightbox.show {
    display: flex;
}

.condolence-lightbox .lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.condolence-lightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: white;
    color: #333;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.condolence-lightbox .lightbox-image {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    z-index: 1;
}

.condolence-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    z-index: 10001;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.condolence-toast.show {
    transform: translateX(0);
}

.condolence-toast-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.condolence-toast-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.condolence-toast i {
    font-size: 1.25rem;
}

.form-field-input.is-invalid,
.form-message-input.is-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.field-error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.field-error::before {
    content: "⚠";
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loader.show {
    opacity: 1;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    position: relative;
    width: 60px;
    height: 60px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--primary-red, #c41e3a);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: -0.45s;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.3s;
}

.spinner-ring:nth-child(3) {
    animation-delay: -0.15s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: var(--text-primary, #333);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
}

.skeleton-loader,
.skeleton-card,
.skeleton-list,
.skeleton-gallery,
.skeleton-timeline {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-line.skeleton-title {
    height: 20px;
    width: 60%;
}

.skeleton-line.skeleton-text {
    width: 100%;
}

.skeleton-line.skeleton-text.short {
    width: 70%;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.skeleton-content {
    margin-top: 1rem;
}

.skeleton-list-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.skeleton-list-content {
    flex: 1;
}

.skeleton-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.skeleton-gallery-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-timeline {
    position: relative;
    padding: 2rem 0;
}

.skeleton-timeline-item {
    margin-bottom: 2rem;
    padding: 1rem;
}

.skeleton-timeline-content {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
}

.error-message {
    padding: 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.error-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(196, 30, 58, 0.1);
    border-radius: 50%;
    color: var(--primary-red, #c41e3a);
    font-size: 2rem;
}

.error-body {
    max-width: 400px;
}

.error-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #333);
    margin: 0 0 0.5rem 0;
}

.error-text {
    font-size: 0.875rem;
    color: var(--text-secondary, #666);
    margin: 0;
    line-height: 1.5;
}

.error-details {
    font-size: 0.75rem;
    color: var(--text-tertiary, #999);
    margin: 0.5rem 0 0 0;
}

.retry-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-red, #c41e3a);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.retry-button:hover {
    background: var(--primary-red-dark, #a01828);
    transform: translateY(-2px);
}

.retry-button:active {
    transform: translateY(0);
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(20);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .error-message {
        padding: 1rem;
    }

    .error-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .error-title {
        font-size: 1rem;
    }

    .error-text {
        font-size: 0.8125rem;
    }

    .skeleton-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
