/* styles/theme.css */

:root {
  /* Brand Colors */
  --color-bg: #F4F7F8;
  --side-bar: #B0B5B8;
  --color-text: #111111;
  --color-primary: #007aff;
  --color-accent: #ff6b6b;

  /* Typography */
  --font-sm: 0.875rem;
  --font-md: 1rem;
  --font-lg: 1.5rem;

  /* Layout / Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;

  /* Borders */
  --border-radius: 6px;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
}

.the-100 {
  margin: 0;
  display: flex;
}

.the-20{
  top: 8px;
  left:8px;
  margin: 8px;
	position: sticky;
  align-items: flex-start;
  width: 20%;
  height: 98.5vh;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
   background-color: var(--side-bar);
  display: flex;
  align-items: center;
  padding: 8px;
  flex-direction: column;
   backdrop-filter: saturate(1.1); 

}

.the-80 {
  width: 80%;
  padding: 16px;
  box-sizing: border-box;
}


.navbar-main{
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.nav-btn{
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
}

.calendar-selector{
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  
}

.calendar-selector select{
  padding: 4px;
  border-radius: var(--border-radius);
  border: 1px solid #ccc;
  cursor: pointer;
}

/* Theme Selection UI */
.theme-section {
  padding: 15px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
	flex-wrap: wrap;
  flex-grow: inherit;
}

.theme-section h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #F49625;
}

.theme-selectors {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  flex-direction: column;
}

.theme-group {
  flex: 1;
}

.theme-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: wheat;
}

.theme-group select {
  width: 100%;
  padding: 8px;
  border-radius: var(--border-radius);
  border: 1px solid #ccc;
}

.theme-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.theme-actions button {
  padding: 8px 12px;
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
}

.theme-actions button:hover {
  background-color: #0056b3;
}

.theme-actions button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.embed-section{
  display: flex;
padding: 15px;
margin: 15px;
flex-direction: column;
max-width: fit-content;
background-color: wheat;
border-radius: 8px;

}

pre#embed-code-block{
  background:#111;
  color:#fff;
  border-radius:8px;
  padding:8px;
  box-sizing:border-box;
  white-space: pre-wrap;
  word-break: break-all;  
  width: 100%;
  font-family: monospace;
  overflow-x: auto;
  line-height: 1.2em;
  max-height: calc(1.2em * 4); /* 3 lines worth */
}

#copy-embed-btn{
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  cursor: pointer;
}


#customizer{
  display: flexbox;
}

.color-selectors-box{
  max-width: 90%;
  display: flex;
  align-items: start;
  justify-content: center;
  margin: 0 auto;
  gap: 12px;
  margin-bottom: 12px;
}

.color-selectors-inner-box{
  display: flex;
  flex-direction: column;
  gap: 8px;
  
}

.color-input{
  display: flex;
  text-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 4px;
  border: 1px solid #DDD;
  background-color: #F9F9F9;
  border-radius: 10px;
  flex-direction: row-reverse;
  cursor: pointer;

}

input[type="color"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 0;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

input[type="color"] {
  border: 1px solid #ddd;
  border-radius: 4px;        
  background: none;             
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 2px;           
}

input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 2px;
}


#new-theme-form {
  border: 1px solid #ccc;
  padding: 15px;
  border-radius: var(--border-radius);
  margin-top: 15px;
  background-color: white;
}

#new-theme-form h4 {
  margin-top: 0;
  margin-bottom: 10px;
}

#custom-theme-name {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: var(--border-radius);
  border: 1px solid #ccc;
}

.theme-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}


.theme-primary-action button {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.theme-primary-action{
   flex: 1 1 auto;
  min-width: 0;
}

.theme-secondary-actions {
  display: flex;
  gap: 10px;
}

#update-custom-theme-btn {
  flex: 7 1 0;
  min-width: 0;
}

#delete-custom-theme-btn {
  flex: 3 1 0;
  min-width: 0;
}

.theme-secondary-actions button {
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.theme-secondary-actions {
	display: flex;
  width: 100%;
	gap: 10px;
}


.theme-form-actions button {
  padding: 8px 12px;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
}

#confirm-save-theme {
  background-color: var(--color-primary);
  color: white;
}

#cancel-save-theme {
  background-color: #f0f0f0;
  color: #333;
}

/* Mobile/Desktop View Toggle Styles */
.view-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.view-toggle-label {
  margin: 0 8px;
  font-size: 14px;
}

.view-toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.view-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.view-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.view-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .view-toggle-slider {
  background-color: var(--color-primary);
}

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

/* Preview container styles for mobile view */
#widget-preview.mobile-view {
  border: solid 1px #333;
  max-width: 350px;
  padding-top: 20px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
}


/* 1) Full-screen flex wrapper */
#upgrade-modal.modal-overlay-wrapper,
#upgrade-modal {
  position: fixed;
  inset: 0;                       /* top:0; right:0; bottom:0; left:0; */
  display: flex;                 /* enable centering */
  align-items: center;
  justify-content: center;
  z-index: 10000;                /* above everything */
  /* Editor typography */
  font-family: 'Quicksand', sans-serif !important;
  text-align: center;            /* center all text by default */
}

/* 2) Backdrop */
#upgrade-modal .modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
}

/* 3) The white “dialog” box */
#upgrade-modal .modal-container {
  position: relative;
  z-index: 10002;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 600px;
  /* match editor’s 30px padding */
  display: flex;
  flex-direction: column;
  /* remove any height caps so it grows to fit content */
  max-height: none;
  overflow: visible;
}

/* 4) Header */
#upgrade-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* match editor’s bottom-padding */
  border-bottom: 1px solid rgba(176, 181, 184, 0.3);
}
#upgrade-modal .modal-header h2 {
  margin: 0 0 15px !important;  /* add bottom margin like editor */
  font-size: 24px !important;    /* match editor size */
  font-weight: 500 !important;
  color: var(--prussian-blue);
}
#upgrade-modal .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--silver);
}

/* 5) Body: no scrollbar, show everything */
#upgrade-modal .modal-body {
  overflow: visible;    /* kill the inner scroll */
  flex: none;           /* allow it to expand */
  line-height: 1.5 !important;  /* tighter, editor-style */
}

/* 6) Premium Banner */
#upgrade-modal .premium-banner {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  border-radius: 8px;
  color: white;
  text-align: center;
  margin: 0 0 20px !important;  /* bottom margin like editor */
}
#upgrade-modal .premium-banner h3 {
  margin: 0 0 10px !important;
  font-size: 24px !important;
}
#upgrade-modal .premium-banner p {
  margin: 0 0 20px !important;
  font-size: 16px;
}

/* 7) Features list */
#upgrade-modal .premium-features {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin: 20px 0 !important;       /* match editor spacing */
  text-align: left;
  line-height: 1.2 !important;
  padding: 20px;
  padding-bottom: 2px;
}
#upgrade-modal .premium-features ul {
  list-style: none;
  padding-left: 1.2em;
}
#upgrade-modal .premium-features li {
  position: relative;
  font-size: 16px !important;
}
#upgrade-modal .premium-features li:before {
  content: "•";
  color: var(--orange-web);
  position: absolute;
  left: -1.2em;
}



/* 8) Action button */
#upgrade-modal .modal-body > button,
#upgrade-modal .modal-content button,
#upgrade-modal .btn-primary {
  display: block;
  margin: 20px auto 0 !important;  /* match editor’s button margin */
  background-color: var(--orange-web);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}
#upgrade-modal .btn-primary:hover {
  background-color: #e89620;
  transform: translateY(-2px);
}

/* 9) Ensure no scrollbar on WebKit */
#upgrade-modal .modal-body::-webkit-scrollbar {
  display: none;
}


.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.modal-content h2 {
  color: var(--prussian-blue);
  margin-top: 0;
  font-size: 24px;
}

.modal-content p {
  color: var(--prussian-blue);
  line-height: 1.5;
}

.modal-content ul {
  color: var(--prussian-blue);
  line-height: 1.6;
}

.modal-content ul li {
  margin-bottom: 8px;
}

/* Modal actions */
.modal-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.modal-actions button {
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.modal-container {
  position: relative;
  background-color: white;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.modal-header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--prussian-blue);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color var(--transition-fast);
}

.modal-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.modal-body {
  padding: var(--space-md);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
}

.step-indicator {
  font-size: 14px;
  color: var(--color-text-muted);
}
