/* ================================================================
   Support Contact Popup — First-time visitor popup
   ================================================================ */

/* Popup Overlay */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9000;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow: hidden;
  box-sizing: border-box;
}

.popup-overlay.show {
  display: flex;
  opacity: 1;
  align-items: center;
  justify-content: center;
}

/* Popup Container */
.support-popup {
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border: 1.5px solid var(--border2);
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 180, 255, 0.1);
  animation: popupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Popup Header with Gradient */
.popup-header {
  background: linear-gradient(135deg, rgba(0, 180, 255, 0.15), rgba(0, 255, 178, 0.08));
  border-bottom: 1px solid var(--border);
  padding: 24px 24px 20px;
  position: relative;
}

.popup-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
}

.popup-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px 0;
  font-family: var(--font-display);
  letter-spacing: -0.5px;
}

.popup-subtitle {
  font-size: 13px;
  color: var(--text3);
  margin: 0;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Close Button */
.popup-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text3);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  font-family: inherit;
}

.popup-close:hover {
  background: var(--bg5);
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(90deg);
}

/* Popup Body */
.popup-body {
  padding: 24px;
}

.popup-text {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
  margin: 0 0 20px 0;
}

.popup-text strong {
  color: var(--accent);
  font-weight: 600;
}

/* Contact Section */
.contact-section {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.contact-section:hover {
  border-color: var(--accent);
  background: rgba(0, 180, 255, 0.05);
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: rgba(0, 180, 255, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.contact-info {
  flex: 1;
  min-width: 0;
}

.contact-label {
  font-size: 11px;
  color: var(--text4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
  margin-bottom: 3px;
}

.contact-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
  word-break: break-all;
}

.contact-value a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s ease;
}

.contact-value a:hover {
  color: var(--accent2);
  text-decoration: underline;
}

/* Features List */
.features-list {
  list-style: none;
  margin: 16px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text2);
}

.features-list li::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(0, 255, 178, 0.15);
  border: 1px solid rgba(0, 255, 178, 0.3);
  border-radius: 4px;
  color: var(--accent2);
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

/* Popup Footer */
.popup-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.popup-button {
  flex: 1;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.popup-button-primary {
  background: linear-gradient(135deg, var(--accent), #0099cc);
  color: #000;
  border: none;
}

.popup-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 180, 255, 0.3);
  background: linear-gradient(135deg, #00c4ff, #00aadd);
}

.popup-button-secondary {
  background: var(--bg4);
  color: var(--text2);
  border: 1px solid var(--border);
}

.popup-button-secondary:hover {
  background: var(--bg5);
  border-color: var(--border2);
  color: var(--text);
}

/* White Mode Adjustments */
html.white-mode .support-popup {
  background: linear-gradient(135deg, #f5f7fa 0%, #eff1f5 100%);
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 180, 255, 0.15);
}

html.white-mode .popup-header {
  background: linear-gradient(135deg, rgba(0, 180, 255, 0.08), rgba(0, 255, 178, 0.05));
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

html.white-mode .contact-section {
  background: #f0f2f5;
  border-color: rgba(0, 0, 0, 0.1);
}

html.white-mode .contact-section:hover {
  background: rgba(0, 180, 255, 0.08);
}

html.white-mode .popup-close {
  background: #f0f2f5;
  border-color: rgba(0, 0, 0, 0.1);
  color: #666;
}

html.white-mode .popup-close:hover {
  background: #e8eaed;
  border-color: var(--accent);
  color: var(--accent);
}

html.white-mode .popup-footer {
  border-top-color: rgba(0, 0, 0, 0.1);
}

html.white-mode .popup-button-secondary {
  background: #f0f2f5;
  border-color: rgba(0, 0, 0, 0.1);
  color: #333;
}

html.white-mode .popup-button-secondary:hover {
  background: #e8eaed;
  border-color: rgba(0, 0, 0, 0.15);
}

/* Responsive Design - Large Desktop (1024px and above) */
@media (min-width: 1024px) {
  .support-popup {
    max-width: 500px;
  }
}

/* Responsive Design - Tablet & Large Mobile (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 769px) {
  .support-popup {
    max-width: 95%;
    width: 100%;
  }

  .popup-header {
    padding: 24px 22px 20px;
  }

  .popup-body {
    padding: 22px;
  }

  .popup-footer {
    padding: 20px 22px;
  }
}

/* Responsive Design - Tablet (768px and below) */
@media (max-width: 768px) {
  .support-popup {
    max-width: calc(100% - 40px);
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
  }

  .popup-header {
    padding: 22px 20px 18px;
  }

  .popup-body {
    padding: 20px;
  }

  .popup-footer {
    padding: 18px 20px;
    flex-direction: column;
    gap: 12px;
  }

  .popup-button {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
  }

  .popup-title {
    font-size: 19px;
  }

  .popup-text {
    font-size: 13.5px;
  }

  .contact-section {
    padding: 14px;
  }

  .features-list li {
    font-size: 13px;
  }
}

/* Responsive Design - Mobile (600px and below) */
@media (max-width: 600px) {
  .support-popup {
    width: calc(100% - 32px);
    max-width: none;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  .popup-header {
    padding: 20px 18px 16px;
    flex-shrink: 0;
  }

  .popup-body {
    padding: 18px;
    overflow-y: auto;
    max-height: calc(85vh - 200px);
  }

  .popup-footer {
    padding: 16px 18px;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
  }

  .popup-button {
    width: 100%;
    padding: 13px 16px;
    font-size: 13.5px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .popup-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
    margin-bottom: 10px;
  }

  .popup-title {
    font-size: 17px;
    margin-bottom: 5px;
  }

  .popup-subtitle {
    font-size: 11px;
  }

  .popup-text {
    font-size: 13px;
    line-height: 1.6;
  }

  .contact-section {
    padding: 13px;
    margin: 14px 0;
  }

  .contact-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .contact-label {
    font-size: 10px;
  }

  .contact-value {
    font-size: 13px;
  }

  .features-list {
    margin: 14px 0;
    gap: 7px;
  }

  .features-list li {
    font-size: 12.5px;
    gap: 8px;
  }

  .features-list li::before {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .popup-close {
    width: 30px;
    height: 30px;
    font-size: 16px;
    top: 16px;
    right: 16px;
  }
}

/* Responsive Design - Medium Mobile (550px - 600px) */
@media (max-width: 600px) and (min-width: 551px) {
  .support-popup {
    width: calc(100% - 40px);
    max-width: none;
    max-height: 82vh;
  }

  .popup-header {
    padding: 20px 19px 16px;
  }

  .popup-body {
    padding: 19px;
    max-height: calc(82vh - 180px);
    overflow-y: auto;
  }

  .popup-footer {
    padding: 16px 19px;
    gap: 12px;
  }

  .popup-button {
    padding: 13px 16px;
    min-height: 44px;
  }

  .popup-icon {
    width: 43px;
    height: 43px;
  }

  .popup-title {
    font-size: 17.5px;
  }
}

/* Responsive Design - Small Mobile (480px - 550px) */
@media (max-width: 550px) {
  .support-popup {
    width: calc(100% - 28px);
    max-width: none;
    max-height: 85vh;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  .popup-header {
    padding: 18px 17px 14px;
    flex-shrink: 0;
  }

  .popup-body {
    padding: 17px;
    overflow-y: auto;
    max-height: calc(85vh - 200px);
  }

  .popup-footer {
    padding: 14px 17px;
    gap: 10px;
    flex-shrink: 0;
  }

  .popup-button {
    padding: 13px 14px;
    font-size: 12.5px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .popup-icon {
    width: 40px;
    height: 40px;
  }

  .popup-title {
    font-size: 16px;
  }

  .popup-text {
    font-size: 12px;
  }

  .contact-section {
    padding: 11px;
    margin: 11px 0;
  }

  .features-list li {
    font-size: 11.5px;
  }
}

/* Responsive Design - Small Mobile (480px and below) */
@media (max-width: 480px) {
  .support-popup {
    width: calc(100% - 24px);
    max-width: none;
    max-height: 95vh;
    border-radius: 12px;
    box-sizing: border-box;
  }

  .popup-header {
    padding: 18px 16px 14px;
  }

  .popup-body {
    padding: 16px;
  }

  .popup-footer {
    padding: 14px 16px;
    flex-direction: column;
    gap: 10px;
  }

  .popup-button {
    width: 100%;
    padding: 12px 14px;
    font-size: 13px;
    border-radius: 9px;
  }

  .popup-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
    margin-bottom: 8px;
  }

  .popup-title {
    font-size: 16px;
    font-weight: 700;
  }

  .popup-subtitle {
    font-size: 10px;
    letter-spacing: 0.3px;
  }

  .popup-text {
    font-size: 12.5px;
    line-height: 1.6;
    margin-bottom: 12px;
  }

  .contact-section {
    padding: 12px;
    margin: 12px 0;
    gap: 10px;
    border-radius: 10px;
  }

  .contact-icon {
    width: 32px;
    height: 32px;
    font-size: 15px;
    min-width: 32px;
  }

  .contact-info {
    flex: 1;
  }

  .contact-label {
    font-size: 9px;
    margin-bottom: 2px;
  }

  .contact-value {
    font-size: 12px;
    font-weight: 600;
  }

  .features-list {
    margin: 12px 0;
    gap: 6px;
  }

  .features-list li {
    font-size: 12px;
    gap: 8px;
    line-height: 1.4;
  }

  .features-list li::before {
    width: 16px;
    height: 16px;
    font-size: 9px;
    flex-shrink: 0;
    min-width: 16px;
  }

  .popup-close {
    width: 28px;
    height: 28px;
    font-size: 15px;
    top: 14px;
    right: 14px;
  }

  .popup-button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 180, 255, 0.25);
  }
}

/* Responsive Design - Ultra Small Mobile (< 375px) */
@media (max-width: 374px) {
  .support-popup {
    width: calc(100% - 20px);
    max-width: none;
    border-radius: 11px;
    max-height: 85vh;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  .popup-header {
    padding: 16px 15px 12px;
    flex-shrink: 0;
  }

  .popup-body {
    padding: 15px;
    overflow-y: auto;
    max-height: calc(85vh - 190px);
  }

  .popup-footer {
    padding: 12px 15px;
    gap: 8px;
    flex-shrink: 0;
  }

  .popup-button {
    padding: 12px 12px;
    font-size: 12px;
    border-radius: 8px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .popup-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .popup-title {
    font-size: 15px;
  }

  .popup-subtitle {
    font-size: 9px;
  }

  .popup-text {
    font-size: 11.5px;
    margin-bottom: 10px;
  }

  .popup-close {
    width: 26px;
    height: 26px;
    font-size: 14px;
    top: 12px;
    right: 12px;
  }

  .contact-section {
    padding: 10px;
    margin: 10px 0;
    gap: 8px;
  }

  .contact-icon {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .contact-label {
    font-size: 8px;
  }

  .contact-value {
    font-size: 11px;
  }

  .features-list {
    margin: 10px 0;
    gap: 5px;
  }

  .features-list li {
    font-size: 11px;
  }

  .features-list li::before {
    width: 15px;
    height: 15px;
    font-size: 8px;
  }
}

/* Animation for dismiss */
.popup-overlay.hide {
  animation: popupFadeOut 0.3s ease forwards;
}

@keyframes popupFadeOut {
  to {
    opacity: 0;
  }
}
