﻿/**
 * Personalize Button - Theme App Extension Styles
 */

/* Hide container by default when product doesn't have required metafields */
.personalize-container[data-has-metafields="false"] {
  display: none;
}

/* Custom button styles - only applied when not using theme default */
.personalize-button--custom {
  background-color: var(--personalize-button-bg, #007bff);
  color: var(--personalize-button-text, #ffffff);
  border: none;
  padding: var(--personalize-button-padding, 12px 24px);
  font-size: var(--personalize-button-font-size, 16px);
  font-weight: bold;
  border-radius: var(--personalize-button-radius, 4px);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  width: 100%;
  margin: 10px 0;
}

.personalize-button--custom:hover {
  opacity: 0.8;
}

/* Modal styles */
.personalize-modal {
  display: none;
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100dvw;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.5);
}

.personalize-modal__content {
  position: relative;
  background-color: white;
  margin: 5% auto;
  padding: 0;
  width: 90%;
  max-width: 1400px;
  height: 80%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.personalize-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}

.personalize-modal__header h3 {
  margin: 0;
  font-size: 18px;
}

.personalize-modal__close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 0;
}

.personalize-modal__close:hover {
  color: #333;
}

.personalize-modal__iframe {
  width: 100%;
  height: calc(100% - 60px);
  border: none;
  border-radius: 0 0 8px 8px;
}

/* Mobile responsive styles for modal */
@media screen and (max-width: 768px) {
  .personalize-modal__content {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    max-width: none !important;
  }

  .personalize-modal {
    padding: 0 !important;
  }

  .personalize-modal__header {
    padding: 10px 15px !important;
  }

  .personalize-modal__header h3 {
    font-size: 16px !important;
  }

  .personalize-modal__close {
    font-size: 20px !important;
  }
}

@media screen and (max-width: 480px) {
  .personalize-modal__header {
    padding: 8px 12px !important;
  }

  .personalize-modal__header h3 {
    font-size: 14px !important;
  }
}
