body {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 160%;
  margin: 0;
  color: #222a5c;
  background-color: #f9f8fb;
}

.top-level-container {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

.top-level-container-clicker {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  align-self: center;
  padding-bottom: 0.4rem;
}

.logo {
  height: 50px;
}

.container {
  padding-top: 0.8rem;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.stw {
  color: var(--background);
  border: 2px solid var(--text);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  background: var(--text);
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  position: relative;
  z-index: 9;
  padding: 8px 32px 8px 22px;
  font-size: 15px;
  font-weight: 600;
  min-height: 50px;
  text-decoration: none;
}
.stw:hover:before {
  -webkit-animation: spanner 650ms forwards;
  animation: spanner 650ms forwards;
  -webkit-animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
  animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
  -webkit-animation-delay: 600ms;
  animation-delay: 600ms;
}
.stw:hover:after {
  -webkit-animation: banner 500ms forwards;
  animation: banner 500ms forwards;
  -webkit-animation-timing-function: ease-out;
  animation-timing-function: ease-out;
  -webkit-animation-delay: 100ms;
  animation-delay: 100ms;
}
.stw:hover .stw__fig {
  -webkit-animation: stem 1100ms forwards;
  animation: stem 1100ms forwards;
  -webkit-animation-delay: 100ms;
  animation-delay: 100ms;
}
.stw:hover .stw__fig:before {
  -webkit-animation: tpointer 1100ms forwards;
  animation: tpointer 1100ms forwards;
  -webkit-animation-delay: 100ms;
  animation-delay: 100ms;
}
.stw:hover .stw__fig:after {
  -webkit-animation: pointer 1100ms forwards;
  animation: pointer 1100ms forwards;
  -webkit-animation-delay: 100ms;
  animation-delay: 100ms;
}
.stw:before {
  width: 0;
  left: auto;
  right: calc(100% + 2px);
  content: "";
  height: 36px;
  background: var(--secondary);
  position: absolute;
  z-index: 1;
}
.stw:after {
  width: 36px;
  left: auto;
  right: -22px;
  content: "";
  height: 36px;
  background: var(--secondary);
  position: absolute;
}
.stw__lbl {
  display: block;
  text-shadow: 0.5px 0.5px 0 rgba(0, 0, 0, 0.15);
  display: relative;
  z-index: 9;
}
.stw__fig {
  display: block;
  position: absolute;
  top: 22px;
  right: -10px;
  height: 2px;
  width: 32px;
  background: var(--background);
  z-index: 9;
}
.stw__fig:before,
.stw__fig:after {
  content: "";
  width: 2px;
  height: 12px;
  position: absolute;
  right: -1px;
  background: var(--background);
}
.stw__fig:before {
  top: -11px;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
  -webkit-transform-origin: bottom right;
  transform-origin: bottom right;
}
.stw__fig:after {
  bottom: -11px;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  -webkit-transform-origin: top right;
  transform-origin: top right;
}

button {
  font-family: "Poppins", sans-serif;
  white-space: break-spaces;
  font-weight: bold;
  background-color: #0074df;
  color: #fff;
  padding: 0.8rem 1rem;
  cursor: pointer;
  border: 0px;
}

button:hover,
button:active {
  background-color: #00a876;
  border-color: #00a876;
}
button:disabled {
  background: #f0eef5 !important;
  color: #75728e !important;
  cursor: not-allowed;
}
button.secondary {
  background: #222a5c;
}
button.secondary:hover,
button.secondary:active {
  background-color: #0074df;
}

a,
a:hover,
a:active {
  color: #db364a;
}

.form-fields {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}

.form-container input {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

.form-container .actions-container {
  padding-top: 0rem;
  margin-left: 0;
  margin-right: 0;
}

input {
  font-weight: 700;
  font-size: 20px;
  border: 1px solid #222a5c;
  background: white;
  padding: 1rem;
}

.active-call-controls {
  display: flex;
  flex: 1;
  align-items: center;
  column-gap: 1em;
}

.call-control {
  margin-left: auto;
}

.status-container {
  display: flex;
  min-height: 3rem;
  align-items: center;
  background-color: #d7d5e0;
  margin-bottom: 2rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.message {
  margin-left: 1.5rem;
}

.call-active {
  background-color: #008464;
  color: white;
}

.oncall {
  margin-left: 1.5rem;
  transform-origin: 80% 80%;
  transform-box: fill-box;
  animation: ringing 2s infinite linear;
  height: 1.5rem;
}
@keyframes ringing {
  0% {
    animation-timing-function: cubic-bezier(0.9647, 0.2413, -0.0705, 0.7911);
    transform: scale(0.9099999999999999);
  }
  51% {
    animation-timing-function: cubic-bezier(0.9226, 0.2631, -0.0308, 0.7628);
    transform: scale(1.3);
  }
  100% {
    transform: scale(0.9099999999999999);
  }
}

.status-container button.urgent {
  font-size: 1rem;
  font-weight: 700;
  background-color: #db364a;
  border-color: #db364a;
  color: #fff;
}

.status-container button.urgent:hover,
.status-container button.urgent:active {
  color: #fff;
  background-color: #222a5c;
}

.script {
  color: #21295c;
  border-radius: 1.25rem 1.25rem 1.25rem 0;
  padding: 1rem 2rem;
  border: 1px solid #d7d5e0;
  background-color: #ffffff;
  font-weight: 500 !important;
  line-height: 160% !important;
}

.script p {
  margin-block-end: 1rem;
}

blockquote {
  border-left: 0.25rem solid #d7d5e0;
  padding: 0.5em 1em;
  margin: 0.5em 0;
}

.actions-container,
.form-container,
.call-ui-container,
.call-ui-survey-complete-container,
.instructions-container {
  padding-top: 2rem;
  align-self: center;
}

.multiple-actions {
  padding-top: 0;
  margin-bottom: 2rem;
}

.call-ui-container,
.call-ui-survey-complete-container {
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.call-ui-survey-complete-container {
  color: #75728e;
  text-align: left;
  align-items: flex-start;
}

.call-ui-survey-complete-container .actions {
  margin-top: 0.5rem;
  text-align: left;
}
.call-ui-survey-complete-container .actions button {
  min-width: 340px;
}

.instructions {
  text-align: center;
  color: #222a5c;
  font-size: 1.25rem;
  line-height: 160%;
}

.help {
  margin-top: 2em;
  font-size: 1rem;
  font-style: italic;
}

.instructions a {
  color: #222a5c !important;
}

.question-text {
  font-size: 1.5rem;
  line-height: 140%;
  text-align: center;
  font-weight: 400;
  color: #75728e;
}

.response-answer,
.callee-name,
.callee-field,
.callee-field-unknown {
  font-weight: bolder;
}

.actions {
  display: flex;
  flex-direction: column;
  row-gap: 2rem;
  align-items: stretch;
  text-align: center;
}

.action-with-context {
  padding-top: 1.5rem;
  border-top: 1px solid #d7d5e0;
}

.action-with-context:first-child {
  border-top: 0;
  padding-top: 0;
}

.action-context {
  margin-bottom: 1rem;
}

.action {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.actions button {
  font-size: 1.25rem;
}

.call-ui-container .actions-container {
  align-items: center;
  display: flex;
  flex-direction: column;
  row-gap: 1em;
}

.call-ui-container .actions {
  align-items: center;
  row-gap: 0;
  margin-bottom: 2rem;
  justify-content: center;
}

.call-ui-container .three-or-more-choices {
  flex-direction: row;
  flex-wrap: wrap;
}

.call-ui-container .text-field-input {
  display: flex;
  margin-top: 1rem;
  align-items: stretch;
  align-self: stretch;
  flex-direction: column;
  row-gap: 2rem;
}

.call-ui-container .text-field-input button {
  align-self: stretch;
}

.call-ui-container .checkbox-input {
  display: flex;
  margin-top: 1rem;
  align-items: stretch;
  align-self: stretch;
  flex-direction: column;
  row-gap: 2rem;
}

.call-ui-container .checkbox-input button.submit {
  align-self: stretch;
}

.call-ui-container .checkbox-input button.checkbox-checked {
  background-color: #008464;
  color: white;
}

.call-ui-container .checkbox-input button.checkbox-unchecked:before {
  content: "☐";
  display: inline-block;
  margin-right: 12px;
  transform: scale(2) translate(0, -1px);
}

.call-ui-container .checkbox-input button.checkbox-checked:before {
  content: "☑";
  display: inline-block;
  margin-right: 12px;
  transform: scale(2) translate(0, -1px);
}

.call-ui-container .mobilize-rsvp-iframe-wrapper {
  overflow: hidden;
  border: 1px solid black;
  margin-bottom: 40px;
}

.call-ui-container .mobilize-rsvp-iframe {
  display: block;
  width: 95vw;
  max-width: 1200px;
  height: 50vh;
  max-height: 800px;
  border: none;

  /*
  This is a bit of a hack -- it cuts off the top of the Mobilize page
  so that you don't see the "host" and "login" toolbar at the top and
  just see the event page. We may need to update this if Mobilize makes
  significant changes, but the DCCC events website does the same thing
  and this has enough slop that the page shouldn't be unusable even if
  they adjust their spacing a bit.
  */
  margin-top: -90px;
}

@media (min-width: 768px) {
  .call-ui-container .mobilize-rsvp-iframe {
    width: 80vw;
  }
}

.call-ui-container .mobilize-rsvp-continue-button {
  text-align: center;
}

.call-ui-container .send-message-wrapper {
  margin-bottom: 2rem;
}

.call-ui-container .send-message-field-wrapper {
  margin-bottom: 2rem;
}

.call-ui-container .send-message-text-field-label {
  font-size: 0.8rem;
}

.call-ui-container .send-message-text-field {
  width: 100%;
  box-sizing: border-box;
}

.call-ui-container .send-message-text-preview {
  border: 1px solid #222a5c;
  background-color: white;
  color: gray;
  padding: 1rem;
  cursor: not-allowed;
}

.call-ui-container .send-message-error {
  color: #db3649;
  height: 3rem;
}

.call-ui-container .send-message-button,
.call-ui-container .polling-place-lookup-button {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
}

.call-ui-container .skip-button {
  color: #75728e;
  background: none;
}

.call-ui-container .polling-place-lookup-and-actions {
  width: 100%;
}

.call-ui-container .polling-place-lookup-wrapper {
  width: 100%;
  margin-bottom: 2rem;
}

.call-ui-container .polling-place-lookup-wrapper .iwillvote-embed {
  width: 100%;
  box-sizing: border-box;
  height: 500px;
}

.call-ui-container .polling-place-lookup-header {
  background-color: #d7d5e0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-column-gap: 5px;
  justify-items: center;
}

.call-ui-container .polling-place-lookup-header .change-address-button {
  background: none;
  padding: 0;
  color: #222a5c;
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: underline;
  margin-left: 1rem;
  margin-right: auto;
}

.call-ui-container
  .polling-place-lookup-header
  .polling-place-lookup-header-text {
  grid-column-start: 2;
}

.call-ui-container .polling-place-lookup-form {
  background-color: #f0eef5;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
}

.call-ui-container .polling-place-lookup-form input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 16px;
  color: #222a5c;
}

.call-ui-container .polling-place-lookup-form .polling-place-lookup-address {
  flex-grow: 1;
}

.call-ui-container .polling-place-lookup-form .polling-place-lookup-zip {
  width: 10em;
}

.call-ui-container .actions button {
  background-color: transparent;
  color: #222a5c;
  min-width: 336px;
  margin-bottom: -1px;
  border-bottom: 1px solid #d7d5e0;
  white-space: break-spaces;
}

.call-ui-container .actions button:first-child {
  border-top: 1px solid #d7d5e0;
}

.call-ui-container .three-or-more-choices button {
  min-width: 336px;
}

a.undo {
  color: #222a5c !important;
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: underline;
  align-self: flex-start;
  margin-bottom: 1em;
  cursor: pointer;
}

.loader {
  width: 140px;
  height: 140px;
  align-self: center;
  margin-top: 2em;
}

.queue-loader {
  display: flex;
  flex-direction: column;
  row-gap: 2em;
  font-size: 0.85rem;
  text-align: center;
  align-self: center;
  margin-top: 2em;
}

.joke {
  font-size: 1.25rem;
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
}

.joke .setup {
  font-weight: 700;
}

.in-queue-ringing {
  align-self: center;
  max-width: 180px;
}

.header {
  width: auto;
  align-self: stretch;
  margin-left: 2rem;
  margin-right: 2rem;
  display: flex;
  justify-content: space-between;
}

.campaign-heading {
  display: flex;
  flex-direction: column;
  row-gap: 0.5em;
}

h1 {
  color: #222a5c;
  display: block;
  margin: 0;
  font-weight: 500;
  font-size: 1.25rem;
  text-align: right;
}

.script h1 {
  font-weight: bold;
  font-size: 2em;
  text-align: unset;
}

.feedback {
  color: #75728e !important;
  font-size: 0.825rem;
  cursor: pointer;
  align-self: flex-end;
}

.status-container {
  align-self: flex-start;
}

.header,
.actions-container,
.form-container,
.call-ui-container,
.call-ui-survey-complete-container,
.status-container,
.instructions-container {
  align-self: stretch;
  margin-left: 2rem;
  margin-right: 2rem;
}

.instructions-container .actions-container {
  margin-left: 0;
  margin-right: 0;
}

.sidebar {
  background-color: #f0eef5;
  box-shadow: -3px 0px 4px rgba(117, 114, 142, 0.15);
  margin-left: 1.5rem;
}

.sidebar-open .sidebar {
  flex-basis: 35%;
  position: relative;
}

.scrollable-column {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

button.sidebarToggle {
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #d7d5e0;
  padding: 0.5rem 0.5rem 0.25rem;
  font-style: normal;
  font-weight: 600;
  font-size: 0.75rem;
  text-align: center;
  text-transform: uppercase;
  color: #222a5c;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

.sidebar-open .sidebarToggle::after {
  /* Icon to close sidebar */
  content: url("data:image/svg+xml,%3Csvg width='9' height='14' viewBox='0 0 9 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.2209 1.5L6.77832 6.9794L1.2209 12.5' stroke='%23222A5C' stroke-width='2' stroke-miterlimit='10'/%3E%3C/svg%3E%0A");
}

.sidebar-closed .sidebarToggle::after {
  /* Icon to open the sidebar */
  content: url("data:image/svg+xml,%3Csvg width='9' height='14' viewBox='0 0 9 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.7791 12.5L2.22168 7.0206L7.7791 1.5' stroke='%23222A5C' stroke-width='2' stroke-miterlimit='10'/%3E%3C/svg%3E ");
}

button.sidebarToggle:hover {
  background: #d7d5e0;
}

.section-heading {
  font-size: 0.75rem;
  font-style: normal;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-left: 2rem;
  margin-right: 2rem;
}

.sidebar-group + .section-heading {
  margin-top: 2em;
}

.sidebar-group .heading {
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
}

.field-value {
  margin-left: 0.4rem;
  font-weight: 600;
}

.sidebar-group {
  font-weight: normal;
  font-size: 0.875rem;
  line-height: 160%;
  margin-left: 2rem;
  margin-right: 2rem;
}

@media (min-width: 568px) {
  .actions-container,
  .form-container,
  .call-ui-container,
  .call-ui-survey-complete-container,
  .instructions-container {
    align-self: center;
    width: 450px;
  }

  .form-container .actions,
  .form-container .text-field-input {
    flex-direction: row;
    column-gap: 1rem;
    align-content: stretch;
  }

  .text-field-input .input-container {
    display: flex;
    color: #222a5c;
    flex-direction: column;
    row-gap: 0.5rem;
  }

  .text-field-input .input-container span {
    align-self: flex-start;
  }

  .form-container .actions button,
  .form-container .text-field-input button,
  .form-container .text-field-input input {
    flex: 1 1 0px;
  }

  .call-ui-container .text-field-input button {
    align-self: center;
    min-width: 320px;
  }
}

/* Go to two columns of survey buttons at this width when the sidebar is closed */
@media (min-width: 768px) {
  .sidebar-closed .call-ui-container,
  .sidebar-closed .call-ui-survey-complete-container,
  .sidebar-closed .call-ui-container .actions-container {
    width: 720px;
  }

  .sidebar-closed .call-ui-container .actions {
    justify-content: space-between;
  }
  .sidebar-closed .call-ui-container .actions button:nth-child(2) {
    border-top: 1px solid #d7d5e0;
  }

  .sidebar-open .mobilize-rsvp-iframe {
    width: 53vw;
  }
}

/* Go to two columns  at a wider point if sidebar open */
@media (min-width: 1200px) {
  .sidebar-open .call-ui-container,
  .sidebar-open .call-ui-survey-complete-container,
  .sidebar-open .call-ui-container .actions-container {
    width: 720px;
  }

  .sidebar-open .call-ui-container .actions {
    justify-content: space-between;
  }
  .sidebar-open .call-ui-container .actions button:nth-child(2) {
    border-top: 1px solid #d7d5e0;
  }

  .sidebar-open .mobilize-rsvp-iframe {
    width: 66vw;
  }
}

@media (min-width: 1300px) {
  .sidebar-closed .header,
  .sidebar-closed .status-container {
    align-self: center;
    width: 1200px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .sidebar-open .sidebar {
    flex-basis: 65%;
  }
}

/* Expand sidebar to function like a modal */
@media (max-width: 767px) {
  .sidebar-closed .sidebar {
    position: fixed;
    z-index: 100;
    bottom: 0;
    right: 0;
  }
  .top-level-container {
    position: relative;
  }

  .sidebar-closed .sidebarToggle {
    margin-bottom: 0;
    padding-top: 0;
  }

  .sidebar-open .sidebar {
    position: absolute;
    z-index: 100;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
  }

  .sidebar-closed .sidebarToggle::after {
    content: none;
  }

  .sidebar-closed .sidebarToggle::before {
    /* Icon to open the full screen sidebar on small screens */
    content: url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 7.77861L6.9794 2.22119L12.5 7.77861' stroke='%23222A5C' stroke-width='2' stroke-miterlimit='10'/%3E%3C/svg%3E");
  }

  .sidebar-open .sidebarToggle::after {
    /* Icon to close the full screen sidebar on small screens */
    content: url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.5 1.22139L7.0206 6.77881L1.5 1.22139' stroke='%23222A5C' stroke-width='2' stroke-miterlimit='10'/%3E%3C/svg%3E");
  }
}

@media (min-width: 2200px) {
  .sidebar-open .header,
  .sidebar-open .status-container {
    align-self: center;
    width: 1200px;
  }
}

.global-alert {
  background-color: orange;
  color: white;
  padding: 11px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 1rem;
}

.global-alert p {
  margin: 0;
}

.global-alert a,
.global-alert a:visited {
  color: white;
  text-decoration: underline;
}

.global-alert a:hover {
  text-decoration: none;
}

.campaign-alert {
  background-color: #5a52a7;
  color: white;
  padding: 11px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 1rem;
}

.campaign-alert p {
  margin: 0;
}

.campaign-alert a,
.campaign-alert a:visited {
  color: white;
  text-decoration: underline;
}

.campaign-alert a:hover {
  text-decoration: none;
}
