/**
 * What we know about you - Widget Styles
 * Surveillance poetry widget CSS
 */

/* Base Widget Container */
#wwkay-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: 'Courier New', Courier, 'Monaco', 'Menlo', monospace;
  font-size: 12px;
  line-height: 1.4;
  box-sizing: border-box;
}

/* Collapsed State */
.wwkay-collapsed {
  width: 200px;
  height: 40px;
  background-color: rgb(248, 248, 255);
  color: #000000;
  border-radius: 4px;
  border: 2px solid #000000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.wwkay-collapsed:focus {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 0 0 2px #7A0661;
}

.wwkay-collapsed.wwkay-hover {
  background-color: #7A0661;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

/* Rotating Text */
.wwkay-rotating-text {
  width: 100%;
  text-align: center;
  padding: 0 10px;
  opacity: 1;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Expanded State */
.wwkay-expanded {
  width: 400px;
  max-height: 500px;
  background-color: rgb(248, 248, 255);
  color: #000000;
  border-radius: 4px;
  border: 2px solid #000000;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  animation: wwkayExpand 0.3s ease-out;
}

@keyframes wwkayExpand {
  from {
    width: 200px;
    height: 40px;
    opacity: 0.8;
  }
  to {
    width: 400px;
    max-height: 500px;
    opacity: 1;
  }
}

/* Header */
.wwkay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px 10px;
  border-bottom: 1px solid #000000;
}

.wwkay-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: bold;
  color: #000000;
}

.wwkay-close {
  background: none;
  border: none;
  color: #000000;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  border-radius: 2px;
  transition: background-color 0.2s ease;
}

.wwkay-close:hover,
.wwkay-close:focus {
  background-color: #7A0661;
  color: #ffffff;
  outline: none;
}

/* Poem Container */
.wwkay-poem-container {
  flex: 1;
  padding: 15px 20px;
  overflow-y: auto;
  max-height: 350px;
  scrollbar-width: thin;
  scrollbar-color: #888 rgb(248, 248, 255);
}

.wwkay-poem-container::-webkit-scrollbar {
  width: 6px;
}

.wwkay-poem-container::-webkit-scrollbar-track {
  background: rgb(248, 248, 255);
}

.wwkay-poem-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.wwkay-poem-container::-webkit-scrollbar-thumb:hover {
  background: #666;
}

.wwkay-poem-container pre {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.4;
  color: #000000;
}


/* Privacy Tools */
.wwkay-tools {
  padding: 10px 20px;
  border-top: 1px solid #000000;
  border-bottom: 1px solid #000000;
  font-size: 11px;
  color: #333;
}

.wwkay-tools a {
  color: #000000;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.wwkay-tools a:hover,
.wwkay-tools a:focus {
  color: #7A0661;
}

.wwkay-detected {
  color: #2e7d32;
  font-style: italic;
}

/* Button Container */
.wwkay-button-container {
  display: flex;
  border-radius: 0 0 2px 2px;
  overflow: hidden;
}

/* Download Button */
.wwkay-download {
  background-color: #000000;
  color: #ffffff;
  border: none;
  border-right: 1px solid #333;
  padding: 12px 15px;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
}

.wwkay-download:hover,
.wwkay-download:focus {
  background-color: #7A0661;
  outline: none;
}

.wwkay-download:active {
  background-color: #5a0449;
}

/* Context Button */
.wwkay-context {
  background-color: #333;
  color: #ffffff;
  border: none;
  padding: 12px 15px;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
}

.wwkay-context:hover,
.wwkay-context:focus {
  background-color: #7A0661;
  outline: none;
}

.wwkay-context:active {
  background-color: #5a0449;
}

/* Mobile Responsive Design */
@media screen and (max-width: 600px) {
  #wwkay-widget {
    bottom: 15px;
    right: 15px;
  }

  .wwkay-collapsed {
    width: 180px;
    height: 36px;
    font-size: 11px;
  }

  .wwkay-expanded {
    width: calc(100vw - 30px);
    max-width: 350px;
    max-height: 400px;
  }

  .wwkay-poem-container {
    max-height: 250px;
    padding: 12px 16px;
  }

  .wwkay-header {
    padding: 12px 16px 8px;
  }


  .wwkay-tools {
    padding: 8px 16px;
    font-size: 10px;
  }

  .wwkay-download,
  .wwkay-context {
    padding: 10px 12px;
    font-size: 10px;
  }
}

@media screen and (max-width: 480px) {
  #wwkay-widget {
    bottom: 10px;
    right: 10px;
  }

  .wwkay-collapsed {
    width: 160px;
    height: 34px;
    font-size: 10px;
  }

  .wwkay-expanded {
    width: calc(100vw - 20px);
    max-width: 320px;
    max-height: 350px;
  }

  .wwkay-poem-container {
    max-height: 200px;
    padding: 10px 14px;
  }

  .wwkay-poem-container pre {
    font-size: 11px;
  }

  .wwkay-header {
    padding: 10px 14px 6px;
  }

  .wwkay-header h3 {
    font-size: 13px;
  }


  .wwkay-tools {
    padding: 6px 14px;
    font-size: 9px;
  }

  .wwkay-download,
  .wwkay-context {
    padding: 8px 10px;
    font-size: 9px;
  }
}

/* Very Small Screens */
@media screen and (max-width: 360px) {
  .wwkay-collapsed {
    width: 140px;
    height: 32px;
    font-size: 9px;
  }

  .wwkay-expanded {
    width: calc(100vw - 16px);
    max-width: 300px;
    max-height: 320px;
  }

  .wwkay-poem-container {
    max-height: 180px;
    padding: 8px 12px;
  }

  .wwkay-poem-container pre {
    font-size: 10px;
  }

  .wwkay-header {
    padding: 8px 12px 4px;
  }

  .wwkay-header h3 {
    font-size: 12px;
  }


  .wwkay-tools {
    padding: 4px 12px;
    font-size: 8px;
  }

  .wwkay-download,
  .wwkay-context {
    padding: 6px 8px;
    font-size: 8px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .wwkay-collapsed {
    background-color: #ffffff;
    border: 3px solid #000000;
    color: #000000;
  }

  .wwkay-expanded {
    background-color: #ffffff;
    border: 3px solid #000000;
    color: #000000;
  }

  .wwkay-header {
    border-bottom-color: #000000;
  }


  .wwkay-tools {
    border-top-color: #000000;
    border-bottom-color: #000000;
  }

  .wwkay-download {
    background-color: #000000;
    border: 2px solid #000000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .wwkay-collapsed,
  .wwkay-close,
  .wwkay-download,
  .wwkay-tools a,
  .wwkay-rotating-text {
    transition: none;
  }

  .wwkay-expanded {
    animation: none;
  }

  .wwkay-collapsed.wwkay-hover {
    transform: none;
  }
}

/* Focus indicators for keyboard navigation */
.wwkay-collapsed:focus-visible,
.wwkay-close:focus-visible,
.wwkay-download:focus-visible {
  outline: 2px solid #7A0661;
  outline-offset: 2px;
}

/* Print styles - hide widget when printing */
@media print {
  #wwkay-widget {
    display: none !important;
  }
}