/* Completed Projects Notifications scope. Exclusive to this dialog. */

.cp-completed-scope-modal {
  position: fixed;
  inset: 0;
  z-index: 10090;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  max-height: 100vh;
  max-height: 100dvh;
  padding: 16px;
  overflow: hidden;
  background: rgba(4, 8, 12, 0.72);
}

.cp-completed-scope-modal-dialog {
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
  max-width: 100%;
  max-height: min(640px, calc(100vh - 32px));
  max-height: min(640px, calc(100dvh - 32px));
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: #1c2024;
  color: #f2f5f8;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.cp-completed-scope-modal-head,
.cp-completed-scope-modal-body,
.cp-completed-scope-modal-actions,
.cp-completed-scope-modal-option,
.cp-completed-scope-modal-option-copy,
.cp-completed-scope-modal-description {
  min-width: 0;
  max-width: 100%;
}

.cp-completed-scope-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cp-completed-scope-modal-head h2 {
  margin: 0;
  color: #f2f5f8;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.cp-completed-scope-modal-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f2f5f8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.cp-completed-scope-modal-body {
  overflow: auto;
  padding: 16px;
}

.cp-completed-scope-modal-description {
  margin: 0 0 14px;
  color: rgba(242, 245, 248, 0.82);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.cp-completed-scope-modal-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.cp-completed-scope-modal-legend {
  margin: 0 0 10px;
  padding: 0;
  color: rgba(242, 245, 248, 0.7);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cp-completed-scope-modal-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: #14171a;
  cursor: pointer;
}

.cp-completed-scope-modal-option:last-child {
  margin-bottom: 0;
}

.cp-completed-scope-modal-option.is-selected,
.cp-completed-scope-modal-option:has(input:checked) {
  border-color: #59b7de;
  background: rgba(89, 183, 222, 0.12);
  box-shadow: inset 0 0 0 1px rgba(89, 183, 222, 0.35);
}

.cp-completed-scope-modal-radio {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #59b7de;
}

.cp-completed-scope-modal-option-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cp-completed-scope-modal-option-label {
  color: #f2f5f8;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cp-completed-scope-modal-option-description {
  color: rgba(242, 245, 248, 0.72);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.cp-completed-scope-modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cp-completed-scope-modal-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.cp-completed-scope-modal-button-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #f2f5f8;
}

.cp-completed-scope-modal-button-primary {
  border-color: #59b7de;
  background: #59b7de;
  color: #0d1b22;
}

.cp-completed-scope-modal-close:focus-visible,
.cp-completed-scope-modal-button:focus-visible,
.cp-completed-scope-modal-radio:focus-visible,
.cp-completed-scope-modal-option:focus-within {
  outline: 2px solid #59b7de;
  outline-offset: 2px;
}

@media (max-width: 1600px) {
  .cp-completed-scope-modal {
    padding: 12px;
  }

  .cp-completed-scope-modal-dialog {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
}

@media (max-width: 1024px), (max-height: 834px) {
  .cp-completed-scope-modal {
    padding: 10px;
  }

  .cp-completed-scope-modal-head,
  .cp-completed-scope-modal-body,
  .cp-completed-scope-modal-actions {
    padding-left: 12px;
    padding-right: 12px;
  }

  .cp-completed-scope-modal-head h2 {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cp-completed-scope-modal,
  .cp-completed-scope-modal-dialog,
  .cp-completed-scope-modal-option,
  .cp-completed-scope-modal-button,
  .cp-completed-scope-modal-close {
    animation: none;
    transition: none;
  }
}
