﻿#punchy-widget-container {
  z-index: 100;
  position: relative;
  max-width: 100%;
}

.punchy-widget-handle {
  height: 50px;
  width: 50px;
  z-index: 101;
  flex-shrink: 0;
}

.punchy-widget-handle-container {
  position: fixed;

  display: flex;
  max-width: 100%;
}

.widget-side-right .punchy-widget-handle-container {
  flex-direction: row-reverse;
}

.widget-side-left .punchy-widget-handle-container {
  flex-direction: row;
}

.punchy-widget-nudge {
  min-height: 50px;
  display: flex;
  align-items: center;
  visibility: hidden;
  position: absolute;
  top: 0;
  z-index: 100;
  transition: transform 0.5s, visibility 0s 0.5s;
}

.punchy-widget-nudge.nudge-visible {
  visibility: visible;
  transition: transform 0.5s, visibility 0s 0s;
}

.widget-side-left .punchy-widget-nudge {
  left: 0;
  padding-left: 55px;
  padding-right: 10px;
  transform: translateX(-100%);
  border-radius: 0 10px 10px 0;
}

.widget-side-right .punchy-widget-nudge {
  right: 0;
  padding-left: 10px;
  padding-right: 55px;
  transform: translateX(100%);
  border-radius: 10px 0 0 10px;
}

.widget-side-left .punchy-widget-nudge.nudge-visible,
.widget-side-right .punchy-widget-nudge.nudge-visible {
  transform: translateX(0);
}

.punchy-widget-nudge.punchy-widget-nudge.nudge-visible {
  border: 1px dotted lightgray;
  box-shadow: 0px -5px 8px #888888;
}


.nudge-text {
  margin: 5px;
  white-space: pre-wrap;
  min-width: min(300px, calc(100vw - 80px));
  max-width: calc(100vw - 80px);
  opacity: 0;
  transition: opacity 0.1s;
}

.nudge-visible .nudge-text {
  opacity: 1;
  transition: opacity 0.3s 0.2s;
}

@media only screen and (min-width: 768px) {
  .nudge-text {
    min-width: 350px;
    max-width: 50vw;
  }
}

@media only screen and (min-width: 1200px) {
  .nudge-text {
    min-width: 400px;
    max-width: 40vw;
  }
}

.punchy-widget-handle .punchy-badge {
  position: absolute;
  top: -0.7em;
  padding: 0em 0.5em;
  border-radius: 50%;
  font-size: 0.8em;
  font-weight: bolder;
}

.widget-side-left .punchy-badge {
  right: -0.7em;
}

.widget-side-right .punchy-badge {
  left: -0.7em;
}

.widget-side-left .punchy-widget-handle-container {
  left: 0px;
}

.widget-side-left .punchy-widget-handle img {
  border-radius: 0px 10px 10px 0px;
}

.widget-side-right .punchy-widget-handle-container {
  right: 0px;
}

.widget-side-right .punchy-widget-handle img {
  border-radius: 10px 0px 0px 10px;
}

.widget-position-1 .punchy-widget-handle-container {
  bottom: 20px;
}

.widget-position-2 .punchy-widget-handle-container {
  bottom: 20%;
}

.widget-position-3 .punchy-widget-handle-container {
  bottom: 40%;
}

.widget-position-4 .punchy-widget-handle-container {
  bottom: 60%;
}

.widget-position-5 .punchy-widget-handle-container {
  bottom: 80%;
}

.punchy-widget-handle-container:hover {
  cursor: pointer;
}


@media only screen and (max-width: 500px) {
  .punchy-widget-modal {
    width: 100%;
    box-shadow: 0px -5px 8px #888888;

    position: fixed;
    bottom: 0px;
    right: 0px;
  }
}


@media only screen and (min-width: 500px) {
  .widget-side-left .punchy-widget-modal {
    left: 0px;
    border-radius: 0px 10px 10px 0px;
  }

  .widget-side-right .punchy-widget-modal {
    right: 0px;
    border-radius: 10px 0px 0px 10px;
  }
}


@media only screen and (min-width: 500px) and (max-width: 1200px) {
  .punchy-widget-modal {
    max-width: 50%;
    box-shadow: 5px 5px 8px #888888;

    position: fixed;
  }
}


@media only screen and (min-width: 1200px) {
  .punchy-widget-modal {
    max-width: 30%;

    box-shadow: 5px 5px 8px #888888;

    position: fixed;
  }
}


.punchy-widget-modal {
  max-height: 100%;

  overflow: hidden;

  border: 1px dotted lightgray;

  display: flex;

  flex-direction: column;
}

.punchy-modal-header {
  margin: 2px 10px;
}

#punchy-widget-container .hidden {
  display: none;
}

.punchy-close-button {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 2em;
  line-height: 1em;
}

.punchy-close-button:hover {
  cursor: pointer;
}

.punchy-refresh-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: inherit;
  line-height: 0;
  vertical-align: middle;
  opacity: 0.7;
}

.punchy-refresh-btn:hover {
  opacity: 1;
}

@keyframes punchy-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.punchy-refresh-btn.spinning svg {
  animation: punchy-spin 0.8s linear infinite;
}

.punchy-modal-container {
  height: 100%;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.punchy-modal-content {
  height: 100%;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.punchy-modal-inner-content {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.punchy-modal-footer {
  width: min-content;
  min-width: 100%;
  line-height: 1em;
  padding: 5px 10px;
}

.punchy-discount-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 0.9em;
}

.punchy-discount-code-value {
  font-weight: bold;
  letter-spacing: 0.05em;
  flex: 1;
}

.punchy-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.7;
  color: inherit;
  line-height: 0;
  border-radius: 3px;
  position: relative;
}

.punchy-copy-btn:hover {
  opacity: 1;
}

.punchy-copy-btn.copied::after {
  content: 'Copied!';
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.75em;
  white-space: nowrap;
  line-height: 1.4;
  pointer-events: none;
}

.slot-size-small .punchy-slot img {
  width: 1.5em;
  height: 1.5em;
}

.slot-size-medium .punchy-slot img {
  width: 2em;
  height: 2em;
}

.slot-size-large .punchy-slot img {
  width: 2.5em;
  height: 2.5em;
}

.punchy-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3px;
}

.punchy-slot {
  filter: opacity(50%);
}

.punchy-slot.future {
  filter: opacity(100%);
}

.punchy-pc-block {
  padding: 10px;
  background-color: #eaedec;
  border: 1px solid lightgray;
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 5px;
  width: max-content;
  max-width: 100%;
}

.punchy-template-content {
  overflow-y: auto;
  flex-grow: 1;
  scrollbar-width: thin;
  scrollbar-color: blue orange;
}

.punchy-modal-content .punchy-template-content {
  padding: 0px 10px 5px;
}

.punchy-template-content::-webkit-scrollbar {
  height: 400px;
  width: 5px;
  /* width of the entire scrollbar */
}

.punchy-template-content::-webkit-scrollbar-thumb {
  background-color: grey;
  /* color of the scroll thumb */
  border-radius: 5px;
  /* roundness of the scroll thumb */
  width: 5px;
}

.punchy-template-description {
  width: min-content;
  min-width: 100%;
  font-size: 0.9em;
  line-height: 1em;
  flex: 1;
}

.punchy-template-name {
  font-weight: 700;
  font-size: 1.2em;
  margin-top: 0.5em;
}

.punchy-template-block hr {
  margin: 0px;
}

.punchy-block-footer {
  padding-left: 5px;
  margin-top: 1em;
}

.punchy-block-action-footer {
  display: none;
}

.punchy-block-header {
  padding-left: 5px;
}

.punchy-cart-button {
  padding: 0.8em;
  border-radius: 1em;
  cursor: pointer;
  border: none;
}

.punchy-cart-button:hover {
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.punchy-hidden {
  display: none;
}

.punchy-modal-actions {
  display: flex;
  gap: 8px;
  padding: 10px;
  justify-content: center;
  font-size: 0.85em;
}

.punchy-detail-link {
  cursor: pointer;
  text-decoration: underline;
  color: inherit;
}

.punchy-detail-link:hover {
  opacity: 0.7;
}

.punchy-action-separator {
  color: #999;
}

.punchy-overlay-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.punchy-overlay-content {
  background-color: white;
  border-radius: 10px;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

@media only screen and (min-width: 768px) {
  .punchy-overlay-content {
    max-width: 600px;
  }
}

.punchy-overlay-header {
  padding: 15px 20px;
  border-radius: 10px 10px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.punchy-overlay-header h3 {
  margin: 0;
  font-size: 1.3em;
}

.punchy-overlay-close {
  font-size: 2em;
  line-height: 0.8em;
  cursor: pointer;
  font-weight: bold;
}

.punchy-overlay-close:hover {
  opacity: 0.7;
}

.punchy-overlay-body {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
}

.punchy-template-detail-block {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.punchy-template-detail-block:last-child {
  border-bottom: none;
}

.punchy-template-config {
  margin: 10px 0;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 5px;
}

.punchy-config-item {
  margin: 5px 0;
}

.punchy-history-item {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
}

.punchy-history-item.punchy-history-active {
  border-color: #4CAF50;
  background-color: #f1f8f4;
}

.punchy-history-item.punchy-history-done {
  border-color: #2196F3;
  background-color: #e3f2fd;
}

.punchy-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.punchy-history-template-name {
  font-weight: bold;
  font-size: 1.1em;
}

.punchy-history-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
}

.punchy-status-active {
  background-color: #4CAF50;
  color: white;
}

.punchy-status-done {
  background-color: #2196F3;
  color: white;
}

.punchy-history-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.9em;
  color: #666;
}

.punchy-history-discounts {
  margin-top: 10px;
  padding: 10px;
  background-color: #fff3cd;
  border-radius: 5px;
}

.punchy-discount-item {
  margin: 5px 0;
}

.punchy-empty-history {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 1.1em;
}