/* Memorandums Page Specific Styles */

/* Memorandum Card Styles */
.memo-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #2c1810;
    overflow: hidden;
}

.memo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.memo-card-header {
    padding: 24px 24px 0 24px;
}

.memo-card-body {
    padding: 0 24px 24px 24px;
}

.memo-priority {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.memo-priority.high {
    background-color: #fee2e2;
    color: #dc2626;
}

.memo-priority.medium {
    background-color: #fef3c7;
    color: #d97706;
}

.memo-priority.low {
    background-color: #dcfce7;
    color: #16a34a;
}

.memo-category {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f3f4f6;
    color: #374151;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.memo-title {
    color: #2c1810;
    font-size: 24px;
    font-weight: 700;
    margin: 12px 0 8px 0;
    line-height: 1.3;
}

.memo-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 16px;
}

.memo-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.memo-excerpt {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 16px;
}

.memo-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.memo-read-btn {
    background-color: #2c1810;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.memo-read-btn:hover {
    background-color: #1a0f08;
    transform: translateY(-1px);
}

.memo-share-btn {
    background-color: transparent;
    border: 2px solid #e5e7eb;
    color: #6b7280;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.memo-share-btn:hover {
    border-color: #2c1810;
    color: #2c1810;
}

/* Make cards clickable */
.cursor-pointer {
    cursor: pointer;
}

.memo-card.cursor-pointer:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Memo Modal Styles */
.memo-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.memo-modal.active {
    opacity: 1;
    visibility: visible;
}

.memo-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.memo-modal.active .memo-modal-content {
    transform: scale(1);
}

.memo-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.memo-modal-body {
    padding: 24px;
    line-height: 1.7;
}

.memo-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
}

.memo-modal-close:hover {
    color: #374151;
}

/* Memorandum Detail Page Styles */
.prose {
    line-height: 1.75;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c1810;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-family: 'Crimson Text', serif;
}

.prose p {
    margin-bottom: 1.25rem;
    color: #374151;
}

.prose ul {
    margin: 1.25rem 0;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
    color: #374151;
}

.prose strong {
    font-weight: 600;
    color: #111827;
}

/* Back button hover effects */
.group:hover svg {
    transform: translateX(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .memo-card-header,
    .memo-card-body {
        padding: 16px;
    }
    
    .memo-card-body {
        padding-top: 0;
    }
    
    .memo-title {
        font-size: 20px;
    }
    
    .memo-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .memo-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .memo-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .memo-modal-header,
    .memo-modal-body {
        padding: 16px;
    }
}

/* Animation for memorandum cards appearing */
.memo-card-enter {
    opacity: 0;
    transform: translateY(20px);
    animation: memoCardEnter 0.5s ease forwards;
}

@keyframes memoCardEnter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search highlight styles */
.search-highlight {
    background-color: #fef3c7;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Filter active states */
#memo-search:focus,
#memo-category:focus,
#memo-year:focus {
    outline: none;
    ring: 2px;
    ring-color: #2c1810;
    border-color: transparent;
}

/* Status indicator */
.memo-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}

.memo-status.active::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #16a34a;
    border-radius: 50%;
}

.memo-status.archived::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #6b7280;
    border-radius: 50%;
}

/* Print styles for memorandums */
@media print {
    .memo-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .memo-actions {
        display: none;
    }
    
    .memo-modal {
        position: static;
        background: none;
        opacity: 1;
        visibility: visible;
    }
    
    .memo-modal-content {
        box-shadow: none;
        max-height: none;
        transform: none;
    }
    
    header, footer, .bg-gray-50, .memo-actions, #share-btn, #print-btn {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .prose {
        max-width: none !important;
    }
    
    h1, h2, h3 {
        color: black !important;
    }
}
