/* Modern HOAI Modal & Pop-Up Styling */
.hoai-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 16px;
    box-sizing: border-box;
}

.hoai-modal-overlay.hoai-modal-active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.hoai-modal-dialog {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 520px;
    overflow: hidden;
    transform: translateY(15px) scale(0.96);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
}

.hoai-modal-overlay.hoai-modal-active .hoai-modal-dialog {
    transform: translateY(0) scale(1);
}

.hoai-modal-header {
    background: linear-gradient(135deg, #1A509A 0%, #284A8A 100%);
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hoai-modal-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.hoai-modal-header-icon {
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hoai-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.hoai-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.hoai-modal-body {
    padding: 24px 22px;
    color: #334155;
    font-size: 15px;
    line-height: 1.6;
    background: #ffffff;
}

.hoai-modal-body-content {
    margin: 0;
}

.hoai-modal-error-list {
    margin: 12px 0 0 0;
    padding-left: 20px;
    color: #dc2626;
}

.hoai-modal-error-list li {
    margin-bottom: 6px;
}

.hoai-modal-footer {
    padding: 14px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    align-items: center;
}

.hoai-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
    box-sizing: border-box;
    font-family: inherit;
}

.hoai-modal-btn:focus {
    outline: 2px solid #1A509A;
    outline-offset: 2px;
}

.hoai-modal-btn-primary {
    background-color: #1A509A;
    color: #ffffff !important;
    border-color: #1A509A;
    box-shadow: 0 2px 4px rgba(26, 80, 154, 0.2);
}

.hoai-modal-btn-primary:hover {
    background-color: #133d75;
    border-color: #133d75;
    color: #ffffff !important;
}

.hoai-modal-btn-secondary {
    background-color: #f1f5f9;
    color: #1A509A !important;
    border-color: #cbd5e1;
}

.hoai-modal-btn-secondary:hover {
    background-color: #e2e8f0;
    color: #0f305f !important;
}

.hoai-modal-btn-outline {
    background-color: transparent;
    color: #64748b !important;
    border-color: #cbd5e1;
}

.hoai-modal-btn-outline:hover {
    background-color: #f1f5f9;
    color: #334155 !important;
    border-color: #94a3b8;
}

@media (max-width: 480px) {
    .hoai-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .hoai-modal-btn {
        width: 100%;
    }
}
