/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

:root {
  --error-color: #d0342c;
  --success-color: #4caf50;
}

#payment-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.payment_method_clover-payments iframe,
.wc-clover-update-card iframe {
  height: 30px !important;
}
.payment_method_clover-payments .form-row,
.wc-clover-update-card .form-row {
  padding: 0 !important;
  margin-bottom: 1rem;
}
.payment_method_clover-payments .form-row.top-row {
  width: 100%;
  margin-bottom: 1rem;
}
.payment_method_clover-payments .form-row:not(.top-row) {
  width: 30%;
}
#card-response {
  width: 100%;
}
.clover-message {
  color: #fff;
  padding: 10px 20px;
}
.clover-error {
  background-color: var(--error-color);
}
.clover-success {
  background-color: var(--success-color);
}
.button-container {
  width: 100%;
}
#submit-button {
  background-color: #fdd010;
  color: #000;
  font-size: 18px;
  font-weight: bold;
  align-items: center;
  width: 100%;
  text-align: center;
  text-transform: uppercase;
}
.clover-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--success-color);
  margin-left: 10px;
  animation: spin 1s ease-in-out infinite;
  -webkit-animation: spin 1s ease-in-out infinite;
}

/* My Account - Subscriptions */
.payment-method ul {
  padding: 0;
  margin: 0;
}
.payment-method li {
  display: flex;
  justify-content: space-between;
}
.payment-method .left,
.payment-method .right {
  display: flex;
}
.payment-method .right > p:first-child {
  margin-right: 50px;
}
.payment-method .new-card-form.hidden {
  display: none;
}

@keyframes spin {
  to {
    -webkit-transform: rotate(360deg);
  }
}
@-webkit-keyframes spin {
  to {
    -webkit-transform: rotate(360deg);
  }
}

.subscription-overview {
  display: flex;
  justify-content: space-between;
}
.subscription-overview p {
  margin-bottom: 0;
}
.subscription-overview p.heading {
  color: #4f2b11;
  text-transform: uppercase;
}
#change-period-btn {
  background-color: #f0ce35;
  border-radius: 3px;
  cursor: pointer;
  display: inline-block;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 3px 5px;
  margin-left: 5px;
}
.popup-subscriptions {
  display: none;
}
.popup-subscriptions.active {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}
.popup-subscriptions .popup-content {
  background-color: #fcf5df;
  padding: 20px;
  border-radius: 5px;
  color: #59260b;
  box-shadow: inset 0px 0px 6px #59260b75;
  max-width: 500px;
}
.popup-subscriptions .popup-content p {
  margin-bottom: 1rem;
}
.popup-title {
  color: #751144;
  font-weight: bold;
}
.popup-subscriptions .buttons {
  display: flex;
  justify-content: center;
  align-items: center;
}
.popup-subscriptions .buttons button {
  background-color: #fcf5df;
  border-radius: 5px;
  box-shadow: inset 0px 0px 6px #59260b75;
  color: #59260b;
  font-weight: 600;
  margin: 0 10px;
  padding: 5px 25px;
  text-transform: uppercase;
}
.period-string {
  font-weight: bold;
  text-decoration: underline;
}

.payment-method,
.subscription-overview {
  background-color: #faf0d7;
  box-shadow: inset 0px 0px 6px #59260b75;
  border-radius: 10px;
  color: #751144;
  padding: 20px;
}
.payment-method p {
  margin-bottom: 0;
}
.new-card-form {
  padding-top: 20px;
}
.notification {
  padding: 10px;
}
.notification.card-updated,
.notification.settings-updated {
  background-color: var(--success-color);
  color: white;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1rem;
}
.notification p {
  margin-bottom: 0;
}
.fade-out {
  animation: 1s fadeOut 4s forwards ease-in-out;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #2196f3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196f3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}
