/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #1e293b;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #64748b;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #1e293b;
}

.modal-body {
    padding: 2rem;
}

.config-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

.config-options {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.option-group h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-size: 1.2rem;
}

/* Sticky Preview & Summary */
.preview-summary-wrapper {
    position: relative;
}

.preview-summary {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Color Options */
.color-options, .size-options, .frame-options, .extra-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-option, .size-option, .frame-option, .extra-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 1rem;
}

.color-option:hover, .size-option:hover, .frame-option:hover, .extra-option:hover {
    border-color: #2563eb;
    background-color: #f8fafc;
}

.color-option input:checked + .color-box,
.size-option input:checked + .size-box,
.frame-option input:checked + .frame-box {
    border-color: #2563eb;
    background-color: #2563eb;
    color: white;
}

.extra-option input:checked + .checkmark {
    background-color: #2563eb;
    border-color: #2563eb;
}

.extra-option input:checked + .checkmark:after {
    display: block;
}

.color-options {
  display: inline;
}
.color-option {
  width: auto;
  display: inline-block !important;
  position: relative;
  border: 1px solid #bbb;
  padding: 5px 20px;
}

.color-option:hover {
  box-shadow: 0 0 10px #bbb;
  border: 1px solid #bbb;
  scale: 1.02;
}


.color-box {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
    display: inline-block;
    vertical-align: text-bottom;
}

.color-box.black {
    background: black;
}

.color-box.color {
    background: linear-gradient(45deg, #ff0000, #ff9900, #ffff00, #00ff00, #0000ff, #9900ff);
}

.size-box, .frame-box {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    min-width: 120px;
    text-align: center;
    transition: all 0.3s ease;
}

/* Checkbox styling for extra options */
.extra-option {
    position: relative;
    padding-left: 3rem;
}

.extra-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.price {
    margin-left: auto;
    font-weight: 600;
    color: #2563eb;
}

/* Preview and Summary */
.image-preview {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding-top: 50px;
}

.image-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.order-summary {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.order-summary h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.summary-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.glossy-extra,
.waterproof-extra,
.delivery-extra {
    display: none;
}


.summary-shipping, .summary-vat {
    padding-top:10px;
}

#summary-subtotal, #summary-shipping, #summary-vat {
    float: right;
    text-align: right;
}

.total-price {
    color: #2563eb;
}

/* Responsive */
@media (max-width: 1024px) {
    .config-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .preview-summary {
        position: static;
    }
    
    .preview-summary-wrapper {
        order: -1;
    }
}

@media (max-width: 768px) {
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .color-option, .size-option, .frame-option, .extra-option {
        flex-direction: column;
        /*text-align: center;*/
        gap: 0.5rem;
    }
    
    .price {
        margin-left: 0;
    }
    
    .extra-option {
        padding-left: 1rem;
        padding-top: 3rem;
    }
    
    .checkmark {
        left: 50%;
        top: 1rem;
        transform: translateX(-50%);
    }
}


/* Voeg toe aan je CSS */
.upload-area {
    position: relative;
}

.upload-area .spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.upload-area.loading .upload-box {
    opacity: 0.5;
    pointer-events: none;
}

.upload-area.dragover {
  background-color: #f0f8ff;
  border-color: #3399ff;
}



/* Customer Form Styles */
.customer-form-section {
  padding: 4rem 0;
  background: #f8fafc;
  max-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  overflow-y: scroll;
}

.form-header {
  text-align: center;
  margin-bottom: 3rem;
}

.form-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #1e293b;
}

.form-container {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Order Summary Sidebar */
.order-summary-sidebar {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  height: fit-content;
  position: sticky;
  top: 2rem;
  margin-top: -40px;
}

.order-summary-sidebar h3 {
  margin-bottom: 0.5rem;
  color: #1e293b;
  padding-top: 40px;
}

.summary-image {
  margin-bottom: 1.5rem;
}

.summary-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  padding-top: 0;
  margin-top: 10px;
/*  border-top: 2px solid #cbd5e1;*/
  font-size: 1.1rem;
}

/* Form Content */
.form-content {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.form-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h4 {
  margin-bottom: 1.5rem;
  color: #1e293b;
  font-size: 1.2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
}

.checkbox-group label {
  margin-bottom: 0;
  font-weight: normal;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .form-container {
    grid-template-columns: 1fr;
  }
  
  .order-summary-sidebar {
    position: static;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    flex-direction: column;
  }
}


#fileInput {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  z-index: -1;
}


#loader {
    text-align: center;
}
.circle-grow-1 {
  --size: 24px;
  --color: currentColor;
  --animation-timing-function: linear;
  --animation-duration: 1s;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background-color: var(--color);
  opacity: 0;
  transform: scale(0);
  animation: var(--animation-timing-function) var(--animation-duration) infinite circle-grow-1-animation;
  display: inline-block;
}

@keyframes circle-grow-1-animation {
  0% {
    opacity: 0;
    transform: scale(0);
  }

  80% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1);
  }
}




/*CHECKOUT*/
#success-modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
}

#success-modal.hidden {
  display: none;
}

/* Modal Box */
#success-modal .success-modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 40px 30px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  animation: fadeIn 0.4s ease-out;
}

/* Close Button */
#success-modal .success-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #aaa;
  transition: color 0.2s;
}

#success-modal .success-modal-close:hover {
  color: #000;
}

/* Checkmark Centering */
#success-modal .success-checkmark {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

#success-modal .checkmark {
  width: 80px;
  height: 80px;
  stroke-width: 2;
  stroke: #4CAF50;
  stroke-miterlimit: 10;
  animation: scaleIn 0.3s ease-in-out both;
}

#success-modal .checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke: #4CAF50;
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

#success-modal .checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: #4CAF50;
  animation: stroke 0.3s 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

/* Text Styles */
#success-modal h2 {
  margin-top: 10px;
  font-size: 1.6rem;
  color: #222;
}

#success-modal p {
  margin-top: 8px;
  color: #555;
  font-size: 1rem;
}

/* Animations */
@keyframes stroke {
  100% { stroke-dashoffset: 0; }
}

@keyframes scaleIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}