/* Common message popup — overlay + dialog chrome */

.common-message-popup {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2000;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 16px;
  visibility: hidden;
  pointer-events: none;
  -webkit-transition: visibility 0s linear 0.3s;
  transition: visibility 0s linear 0.3s;
}

.common-message-popup[hidden] {
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: flex !important;
}

.common-message-popup.is-open {
  visibility: visible;
  pointer-events: auto;
  -webkit-transition: visibility 0s linear 0s;
  transition: visibility 0s linear 0s;
}

.common-message-popup-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  -webkit-transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.common-message-popup.is-open .common-message-popup-backdrop {
  opacity: 1;
}

.common-message-popup-dialog {
  position: relative;
  width: 420px;
  max-width: 100%;
  background: #fff;
  border-radius: 12px;
  -webkit-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  opacity: 0;
  -webkit-transform: translate(0, -50px);
  transform: translate(0, -50px);
  -webkit-transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    -webkit-transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.common-message-popup.is-open .common-message-popup-dialog {
  opacity: 1;
  -webkit-transform: none;
  transform: none;
}

.common-message-popup-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #dee2e6;
}

.common-message-popup-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #333;
  line-height: 1.4;
  word-break: break-word;
}

.common-message-popup-body {
  padding: 1.25rem;
}

.common-message-popup-content {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
}

.common-message-popup-footer {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  border-top: 1px solid #dee2e6;
  gap: 10px;
}

#commonMessagePopup .btn-cancel,
#commonMessagePopup .btn-submit {
  min-width: 120px;
  height: 48px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  -webkit-transition: opacity 0.2s;
  transition: opacity 0.2s;
}

#commonMessagePopup .btn-cancel:hover,
#commonMessagePopup .btn-submit:hover {
  opacity: 0.8;
}

#commonMessagePopup .btn-cancel {
  background-color: #eff0f2;
  color: #333;
}

#commonMessagePopup .btn-submit {
  background-color: #e8f5e9;
  background-color: var(--vscode-blue-bg, #e8f5e9);
  color: #03c75a;
  color: var(--vscode-blue, #03c75a);
}

#commonMessagePopup .btn-cancel[hidden],
#commonMessagePopup .btn-submit[hidden] {
  display: none;
}
