.giftos-personalizare {
  --giftos-dark: #203245;
  --giftos-blue: #1cb5da;
  --giftos-green: #80b440;
  --giftos-border: #d4dce2;
  color: var(--giftos-dark);
  font-size: 12px;
  margin: 15px 0 12px;
  width: 100%;
  clear: both;
}
.giftos-personalizare *, .giftos-delivery * { box-sizing: border-box; }
.giftos-personalizare .giftos-ai-row { display: flex; align-items: stretch; gap: 5px; }
.giftos-personalizare #giftos-context {
  flex: 1 1 65%; min-width: 0; resize: vertical; min-height: 43px; max-height: 100px;
  border: 1px solid var(--giftos-border); border-radius: 9px; padding: 8px;
  background: #fff; color: var(--giftos-dark); font-size: 11px; line-height: 1.45;
  margin: 0;
}
.giftos-personalizare .giftos-ai-button {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  background: #d8ff4a; color: #101010; border: 1px solid #badf31; border-radius: 26px;
  font-weight: 900; font-size: 11px; letter-spacing: .02em;
  padding: 0 12px; margin: 0; cursor: pointer; box-shadow: 0 3px 0 #add527;
}
.giftos-personalizare .giftos-ai-button:hover, .giftos-personalizare .giftos-ai-button:focus {
  background: #caff23; color: #101010; border-color: #9ec522;
}
.giftos-personalizare .giftos-ai-bolt { font-size: 15px; line-height: 1; filter: grayscale(1) brightness(.12); }
.giftos-personalizare .giftos-ai-button:disabled { opacity: .6; cursor: wait; }
.giftos-personalizare .giftos-helper { color: #92a1ac; font-size: 9px; line-height: 1.35; margin: 3px 0 8px; }
.giftos-personalizare .giftos-ai-status { font-size: 11px; line-height: 1.4; color: #6957a0; }
.giftos-personalizare .giftos-ai-status:empty { display: none; }
.giftos-personalizare .giftos-ai-suggestions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 7px 0 12px; }
.giftos-personalizare .giftos-ai-suggestions[hidden] { display: none; }
.giftos-personalizare .giftos-suggestion-item {
  display: flex; flex-direction: column; gap: 2px; justify-content: center; text-align: center;
  border: 1px solid #c7cde3; border-radius: 8px; background: #f8f6ff; color: #243246;
  min-height: 46px; padding: 7px 4px; cursor: pointer; margin: 0;
}
.giftos-personalizare .giftos-suggestion-item strong { font-size: 11px; line-height: 1.3; }
.giftos-personalizare .giftos-suggestion-item span { font-size: 11px; color: #6a559b; line-height: 1.3; }
.giftos-personalizare .giftos-suggestion-item:hover, .giftos-personalizare .giftos-suggestion-item.is-selected {
  border-color: #664ec5; background: #ece9ff; box-shadow: 0 0 0 1px #664ec5 inset;
}
.giftos-personalizare .giftos-checks { display: flex; flex-wrap: wrap; column-gap: 18px; row-gap: 7px; margin: 7px 0 17px; }
.giftos-personalizare .giftos-checks label { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; cursor: pointer; margin: 0; font-size: 11px; }
.giftos-personalizare input[type="checkbox"] { width: 14px; height: 14px; accent-color: #ff991c; margin: 0; }
.giftos-personalizare .giftos-field-title { font-size: 12px; color: var(--giftos-dark); font-weight: 500; margin: 13px 0 8px; line-height: 1.2; }
.giftos-personalizare .giftos-text-fields { display: grid; gap: 7px; }
.giftos-personalizare .giftos-text-row {
  display: flex; align-items: stretch; min-height: 33px; border: 1px solid var(--giftos-border);
  border-radius: 7px; overflow: hidden; background: #fff;
}
.giftos-personalizare .giftos-clear {
  flex: 0 0 30px; background: #f0f1f3; color: #46566b; font-weight: 800;
  border: none; border-right: 1px solid var(--giftos-border); cursor: pointer;
  padding: 0; margin: 0; font-size: 18px; border-radius: 0;
}
.giftos-personalizare .giftos-text-row input[type="text"] {
  flex: 1 1 auto; width: 0; padding: 5px 9px; border: 0; background: #fff;
  font-size: 12px; color: #263a4d; margin: 0; min-width: 0;
}
.giftos-personalizare .giftos-text-row input[type="text"]:focus { outline: none; box-shadow: none; }
.giftos-personalizare .giftos-text-row input[type="text"]::placeholder { color: #9dabb7; opacity: 1; }
.giftos-personalizare .giftos-max { align-self: center; font-size: 10px; color: #b1bcc5; padding-right: 7px; }
.giftos-personalizare .giftos-color { flex: 0 0 34px; display: grid; place-items: center; border-left: 1px solid var(--giftos-border); margin: 0; cursor: pointer; }
.giftos-personalizare .giftos-color input[type="color"] {
  -webkit-appearance: none; appearance: none; border: 0; padding: 0; background: none;
  height: 22px; width: 22px; cursor: pointer;
}
.giftos-personalizare .giftos-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 1px; }
.giftos-personalizare .giftos-color input[type="color"]::-webkit-color-swatch { border-radius: 50%; border: 1px solid #e7e7e7; }
.giftos-personalizare .giftos-color input[type="color"]::-moz-color-swatch { border-radius: 50%; border: 1px solid #e7e7e7; }
.giftos-personalizare .giftos-photo-section {
  margin: 15px 0 13px; padding: 12px; border: 1px solid #dbe5df;
  border-radius: 10px; background: #fbfff1;
}
.giftos-personalizare .giftos-photo-section .giftos-field-title { margin: 0 0 10px; font-weight: 700; }
.giftos-personalizare .giftos-photo-upload-label {
  display: block; font-size: 12px; font-weight: 700; margin-bottom: 7px; color: #263525;
}
.giftos-personalizare #giftos-photo-file {
  display: block; width: 100%; max-width: 100%; font-size: 11px;
  padding: 7px; background: white; border: 1px solid #c7d9b3; border-radius: 7px;
}
.giftos-personalizare .giftos-photo-editor[hidden] { display: none; }
.giftos-personalizare #giftos-photo-canvas {
  display: block; width: min(100%, 320px); height: auto; aspect-ratio: 1;
  margin: 11px auto; border: 2px solid #9dbb43; border-radius: 7px;
  touch-action: none; cursor: grab; background: #edf4dc;
}
.giftos-personalizare #giftos-photo-canvas:active { cursor: grabbing; }
.giftos-personalizare .giftos-photo-tools {
  display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px; justify-content: space-between;
}
.giftos-personalizare .giftos-photo-tools label {
  flex: 1 1 150px; display: grid; gap: 6px; font-size: 11px; font-weight: 600;
}
.giftos-personalizare #giftos-photo-zoom { width: 100%; accent-color: #9acd08; }
.giftos-personalizare #giftos-photo-reset {
  padding: 7px 10px; margin: 0; border: 1px solid #c0cdb7;
  border-radius: 6px; background: #fff; color: #273928; cursor: pointer; font-size: 11px;
}
.giftos-personalizare .giftos-photo-apply {
  display: block; width: 100%; margin: 11px 0 0; padding: 11px 9px;
  border: 0; border-radius: 7px; background: #d8ff4a;
  color: #101010; font-size: 12px; font-weight: 800; cursor: pointer;
}
.giftos-personalizare .giftos-photo-apply:hover { background: #caff23; color: #101010; }
.giftos-personalizare .giftos-photo-apply:disabled { opacity: .6; cursor: wait; }
.giftos-personalizare .giftos-photo-status { margin-top: 7px; font-size: 11px; line-height: 1.45; color: #336024; }
.giftos-personalizare .giftos-photo-status:empty { display: none; }
.giftos-personalizare .giftos-size-list { display: flex; flex-wrap: wrap; gap: 7px; }
.giftos-personalizare .giftos-choice {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--giftos-border);
  background: #fff; border-radius: 3px; padding: 6px 8px 6px 5px;
  font-size: 11px; color: #50647c; margin: 0; cursor: pointer; min-height: 29px;
}
.giftos-personalizare input[type="radio"] { appearance: auto; width: 15px; height: 15px; margin: 0; accent-color: #ff991c; cursor: pointer; }
.giftos-personalizare .giftos-format-list { display: grid; gap: 7px; margin-bottom: 11px; }
.giftos-personalizare .giftos-format { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 400; color: #536781; margin: 0; cursor: pointer; }
.giftos-personalizare .giftos-format .amount { color: inherit; font-size: inherit; font-weight: inherit; }
.giftos-personalizare .giftos-preview-button {
  display: block; width: 100%; min-height: 43px; background: var(--giftos-blue);
  color: #fff; font-size: 13px; font-weight: 700; border: none; border-radius: 6px;
  box-shadow: 0 8px 15px rgba(28,181,218,.16); margin: 8px 0 0; padding: 10px; cursor: pointer;
}
.giftos-personalizare .giftos-preview-button:hover { background: #0e9fc5; color: #fff; }
.giftos-personalizare .giftos-preview-hint { font-size: 11px; color: #2a7e58; margin: 5px 0 0; }
.giftos-personalizare .giftos-preview-hint:empty { display: none; }
.giftos-personalizare .giftos-preview-hint.giftos-error { color: #c23b3b; }
.single-product form.cart:has(.giftos-personalizare) { display: block; }
.single-product form.cart:has(.giftos-personalizare) .single_add_to_cart_button {
  display: block; float: none; clear: both; width: 100%; min-height: 43px;
  margin: 10px 0 12px; background: #80b440; color: white; border: 0;
  border-radius: 7px; font-size: 13px; font-weight: 700;
  box-shadow: 0 7px 15px rgba(106,151,44,.2);
}
.single-product form.cart:has(.giftos-personalizare) .single_add_to_cart_button:hover { background: #6c9d30; color: #fff; }
.single-product form.cart:has(.giftos-personalizare) .single_add_to_cart_button::before { content: '▣'; margin-right: 10px; }
.single-product form.cart:has(.giftos-personalizare) .quantity { float: none; margin-bottom: 8px; }
.giftos-delivery { margin-top: 14px; clear: both; color: #647590; font-size: 11px; text-align: center; }
.giftos-delivery h3 { margin: 9px 0 6px; font-size: 12px; font-weight: 700; color: #3e7e91; }
.giftos-delivery-content { border: 1px solid #d9e4e9; border-radius: 9px; background: #fbfdfe; padding: 12px; line-height: 1.5; }
.giftos-delivery-content a { color: #168eae; text-decoration: underline; }
.woocommerce-product-gallery .giftos-gallery-anchor { position: relative !important; }
.woocommerce-product-gallery .giftos-image-overlay {
  position: absolute; top: 37%; left: 50%; width: 55%; transform: translate(-50%, -50%);
  z-index: 7; pointer-events: none; text-align: center; line-height: 1.06;
  font-family: Georgia, 'Times New Roman', serif; overflow-wrap: anywhere;
}
.woocommerce-product-gallery .giftos-photo-mockup {
  position: absolute; top: 49%; left: 50%; width: 32%; aspect-ratio: 1;
  transform: translate(-50%, -50%); z-index: 6; pointer-events: none;
  overflow: hidden; border-radius: 4px;
}
.woocommerce-product-gallery .giftos-photo-mockup[hidden] { display: none; }
.woocommerce-product-gallery .giftos-photo-mockup img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  border: 0; border-radius: 0; box-shadow: none;
}
.woocommerce-product-gallery .giftos-image-overlay[hidden] { display: none; }
.woocommerce-product-gallery .giftos-overlay-first { font-size: clamp(12px, 2.5vw, 27px); font-weight: 700; }
.woocommerce-product-gallery .giftos-overlay-second { font-size: clamp(18px, 3.8vw, 43px); font-weight: 800; margin-top: 5px; }
@media (max-width: 767px) {
  .giftos-personalizare { margin-top: 12px; }
  .giftos-personalizare .giftos-choice { padding: 6px; }
  .giftos-personalizare .giftos-ai-button { font-size: 10px; }
  .woocommerce-product-gallery .giftos-overlay-first { font-size: clamp(12px, 5vw, 22px); }
  .woocommerce-product-gallery .giftos-overlay-second { font-size: clamp(16px, 7vw, 34px); }
}
@media (max-width: 440px) {
  .giftos-personalizare .giftos-ai-suggestions { grid-template-columns: 1fr; }
}
