/* ============================================
   Modal Styles
   ============================================ */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 40, 54, 0.5);
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
    border-radius: 20px;
    padding: 2rem;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-glass-lg);
    border: 1px solid var(--border-glass-strong);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2rem;
}

/* ============================================
   Blog Result Modal
   ============================================ */

.blog-result-modal {
    max-width: 800px;
    padding: 0;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--border-glass-subtle);
    cursor: pointer;
    color: var(--text-primary);
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    transition: all var(--transition-glass);
    z-index: 10;
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close svg {
    display: none;
}

.modal-close::after {
    content: "\00D7";
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
}

.modal-close:hover {
    background: var(--glass-bg-light);
    border-color: var(--border-glass);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.blog-result-header {
    background: var(--glass-bg-primary);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    padding: 2rem;
    text-align: center;
    border-radius: 20px 20px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-result-header svg {
    margin-bottom: 1rem;
}

.blog-result-header h2 {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.blog-result-content {
    padding: 2rem;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
}

.blog-result-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.blog-result-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.blog-result-body p {
    margin-bottom: 1rem;
}

.blog-result-body h2,
.blog-result-body h3 {
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem 0;
    font-weight: 600;
}

.blog-result-body h2 {
    font-size: 1.25rem;
}

.blog-result-body h3 {
    font-size: 1.1rem;
}

.blog-result-body ul,
.blog-result-body ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.blog-result-body li {
    margin-bottom: 0.5rem;
}

.blog-result-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0 0 16px 16px;
}

.blog-result-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
