/* ─────────── BASE ─────────── */

* {
  box-sizing: border-box;
}

select {
  width: 100%;
}

.select2-container {
    min-width: 60% !important;
    flex-grow: 1; /* ensuring 60% in dropdown from js (recipe, etc.) */
    margin-bottom: 12px !important; /* force bottom margin - 20px for other input normal fields */
}

/* ─────────── FONT INHERIT ─────────── */

input,
textarea,
select,
button {
  font-family: inherit !important;
}


/* ─────────── Loader ─────────── */

.dp-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.dp-bar-loader {
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    overflow: hidden;
    position: relative;
    margin-top: 10px;
    border-radius: 2px;
}

.dp-bar-loader::before {
    content: '';
    position: absolute;
    height: 100%;
    width: 40%;
    background-color: #4caf99;
    animation: dpBarSlide 1s linear infinite;
    border-radius: 2px;
}

@keyframes dpBarSlide {
    0% { left: -40%; }
    50% { left: 30%; width: 60%; }
    100% { left: 100%; }
}

/* ─────────── Hide Recaptcha ─────────── */

.grecaptcha-badge { 
  visibility: hidden;
}

/* ─────────── CONTAINERS ─────────── */


.dp-crud-container {
  padding: 0px;
  margin-bottom: 20px;
  background: white;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.dp-crud-rounded-container {
  border-radius: 12px;
}

.dp-form * {
  box-sizing: border-box;
}


/* ─────────── FORM CONTAINERS ─────────── */

.dp-crud-action-block {
  position: relative;
  width: 100%;
  flex: 1 1 100%; /* Ensure it grows to full width on small screens */
}

.dp-crud-module {
  margin-top: 0;
  margin-bottom: 0;
}

.dp-crud-tile-form {
  width: 100%;
  max-width: 800px; /* You can control how wide the form content should get */
  background: white;
  padding: 1rem;
  border-radius: 5px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.dp-form-wrapper.absolute-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  background: white;
  border-radius: 0; /* Optional: remove border radius for fullscreen look */
  padding: 2rem;
  animation: dpFadeSlideIn 0.3s ease forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .dp-form-wrapper.absolute-overlay {
    max-width: 800px;
  }
}

@keyframes dpFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dp-close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  color: #999;
  z-index: 1001;
}
.dp-close-button:hover {
  color: #000;
}


/* ─────────── ACTION TILES ─────────── */

.dp-crud-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px; /* or any value like 10px or 5px */
  overflow: visible;
}

.dp-crud-action-tile {
  flex: 1;
  width: 100%;
  align-content: center;
  margin-bottom: 5px;
  background: var(--wp--preset--color--accent-3);
  color: #fff;
  padding: 5px;
  padding-left: 10px;
  border-radius: 12px;
  font-size: var(--wp--preset--font-size--large);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  border: none;
  min-height: 60px;
  font-family: inherit;
  position: relative;
  z-index: 1; /* ensure button stays clickable below open form */
}

.dp-crud-action-tile:hover {
  background: #9b330a;
}


/* ─────────── INPUTS ─────────── */

.dp-input,
.dp-textarea {
  width: 100%;
  margin-bottom: 20px;
  padding: 10px 5px;
  border: none;
  border-bottom: 1px solid #000;
  background: transparent;
  font-size: 16px;
}

.dp-input::placeholder,
.dp-textarea::placeholder {
  color: #333;
  font-style: italic;
}

/* ─────────── RADIO ─────────── */

.dp-radio-group {
  display: flex;
  justify-content:space-between;
  margin-bottom: 5px;
}

.dp-radio-option {
  flex: 0 0 48%;
  border: 0;
  text-align: center;
  padding: 3px;
  cursor: pointer;
  background: transparent;
  transition: all 0.3s ease;
  border-radius: 5px;
  position: relative;
}

.dp-radio-option input[type="radio"] {
  display: none;
}

.dp-radio-option.selected {
  background: VAR(--wp--preset--color--accent-2);
  color: #000;
  border: 1px solid #000;
}

/* ─────────── BUTTONS ─────────── */

.dp-button,
.dp_ncs_button,
.dp-msg-submit {
  width: 100%;
  background: var(--wp--preset--color--accent-3);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 30px;
  font-size: var(--wp--preset--font-size--large);
  cursor: pointer;
  margin-top: 10px;
  text-decoration: none;
  display: inline-block;
  font-family: inherit;
}

.dp-button:hover {
  background: #9b330a;
}

.dp_ncs_button:hover {
  background: #9b330a;
}

.dp-msg-submit {
  background: #fff;
  color: #000;
}

.dp-save-button {
  background-color: var(--wp--preset--color--accent-5);
  border-radius: 5px;
  padding:5px;
  color: #fff;
}

.dp-transparent-btn {
  background: transparent;
  border: none;
  border-radius: 5px;
  color: inherit;
  padding: 5px;
  font-size: 0.9em;
  cursor: pointer;
  text-decoration: underline;
}

.dp-button-add-row {
  background: transparent;
  border: none;
  border-radius: 5px;
  width: fit-content;
  color: inherit;
  padding: 5px;
  font-size: var(--wp--preset--font-size--large);
  cursor: pointer;
}
.dp-button-add-row:hover {
  background: transparent;
}

/* ─────────── MESSAGES ─────────── */

.dp-message-banner,
.dp_ncs_message_banner {
  margin-top: 15px;
  padding: 12px;
  border-radius: 5px;
  text-align: center;
  font-weight: bold;
  display: none;
}

.dp-success,
.dp_ncs_success {
  background: #d4edda;
  color: #155724;
}

.dp-error,
.dp_ncs_error {
  background-color: #f8d7da;
  color: #721c24;
}

/* ─────────── TABLES ─────────── */

.dp-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.dp-table th,
.dp-table td {
  border-bottom: 1px solid #000;
  padding: 5px;
  text-align: left;
  font-size: 18px;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dp-table th {
  background-color: transparent;
  font-style: italic;
}


/* public order view tables */

.dp-table-recipe-order {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.dp-table-recipe-order th,
.dp-table-recipe-order td {
  border-bottom: 1px solid #000;
  padding: 5px;
  text-align: left;
  font-size: var(--wp--preset--font-size--large);
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
  vertical-align: top;
}

.dp-table-recipe-order th {
  background-color: transparent;
  font-style: italic;
}


.dp-recipe-order-warning {
  background-color: var(--wp--preset--color--accent-1)
}

.dp-recipe-order-classic {
  background-color: var(--wp--preset--color--accent-2);
}


.dp-ingredients-box {
  white-space: normal;
  overflow: visible;
  word-wrap: break-word;
  margin-top: 5px;
}


.dp-table-income {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  margin-top: 15px;
  border: none;
}

.dp-table-income th,
.dp-table-income td {
  border: none;
  padding: 5px;
  text-align: left;
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
  vertical-align: bottom;
}

/* Optional: keep border after comment row */
.dp-income-comment-row {
  border-bottom: 1px solid #000;
}
.dp-income-comment-row td {
  padding-top: 0;
  padding-bottom: 1.2em;
  font-style: italic;
}y

/* Highlight positive balances */
.dp-positive-balance {
    background-color: var(--wp--preset--color--accent-1);
}
.dp-positive-balance td {
    background-color: var(--wp--preset--color--accent-1);
}

.dp-order-export table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9em;
}

.dp-order-export th, .dp-order-export td {
    border-bottom: 1px solid #ccc;
    padding: 6px 10px;
    text-align: left;
    max-width: none;
}

.dp-order-export th {
    background: var(--wp--preset--color--accent-2);
    font-weight: bold;
}

.dp-client-history-export table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9em;
}

.dp-client-history-export th, .dp-client-history-export td {
    border-bottom: 1px solid #ccc;
    padding: 6px 10px;
    text-align: left;
    max-width: none;
}

.dp-client-history-export th {
    background: var(--wp--preset--color--accent-2);
    font-weight: bold;
}

.dp-balance-export table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9em;
}

.dp-balance-export th, .dp-balance-export td {
    border-bottom: 1px solid #ccc;
    padding: 6px 10px;
    text-align: left;
    max-width: none;
}

.dp-balance-export th {
    background: var(--wp--preset--color--accent-2);
    font-weight: bold;
}

.dp-recipe-export table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9em;
}

.dp-recipe-export th, .dp-recipe-export td {
    border-bottom: 1px solid #ccc;
    padding: 6px 10px;
    text-align: left;
    max-width: none;
}

.dp-recipe-export th {
    background: var(--wp--preset--color--accent-2);
    font-weight: bold;
}

/* full width tables no max width restriction from dp crud container */

.dp-balance-export, .dp-client-history-export, .dp-order-export, .dp-recipe-export {
    max-width: none;
}


/* ─────────── FULL PAGE OVERLAYS ─────────── */

.dp_ncs_full_banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--wp--preset--color--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2rem;

  /* Force it to escape theme layout constraints */
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

body #dp_ncs_confirm_banner,
body #dp_ncs_success_overlay {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    z-index: 99999 !important;
}

.dp_ncs_full_banner_inner {
    background: white;
    padding: 2rem;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90%;
    margin: 0 auto;
}


.dp_ncs_full_banner_inner p {
  font-size: 1.2em;
  margin-bottom: 1.5rem;
}

/* ─────────── FORM STYLES ─────────── */



.group-label {
  font-size: var(--wp--preset--font-size--x-large);
  font-weight: bold;
  font-family: inherit;
  font-style: italic;
  margin: 30px 0 10px;
  text-align: left;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.dp-info-subscription {
  display: flex;
  flex-direction: column;
  font-style: normal;
  gap: 10px;
  padding: 12px;
  
}

.dp-selection-subscription {
  display: flex;
  flex-direction: column;
  background-color: var(--wp--preset--color--accent-2);
  font-style: normal;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 10px;
}

.button-group button {
  flex: 1 1 100%;
  padding: 12px;
  border: 1px solid #ccc;
  background: transparent;
  font-family: inherit;
  font-size: var(--wp--preset--font-size--large);
  cursor: pointer;
  text-align: left;
  border-radius: 10px;
  display: inline-block;
  transition: all 0.3s ease;
}

.button-group button.selected {
  border: 1px solid black;
  background-color: var(--wp--preset--color--accent-2);
  animation: pulse-shadow 3s infinite ease-in-out;
}

.button-group button:hover {
  border: 1px solid black;
  background-color: var(--wp--preset--color--accent-2);
}

@keyframes pulse-shadow {
  0%   { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
  20%  { box-shadow: 0 0 0px 2px rgba(0, 0, 0, 1); }
  40%  { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.button-group[data-name="subscription_type_ncs"] button {
  flex: 1 1 calc(50% - 10px);
}


.button-group[data-name="place_ncs"] button {
  flex: 1 1 calc(50% - 10px);
}


.button-group[data-name="size_ncs"] button {
  flex: 1 1 calc(33.333% - 10px);
}

.button-group[data-name="start_date_choice"] button {
    flex: 1 1 calc(50% - 10px);
}



.dp_ncs_section_label {
    font-weight: bold;
    font-style: italic;
    font-size: 1.1em;
    margin-top: 1.5em;

}

.dp-ncs-spacer {
    height: 25px;
    width: 100%;
}

.dp_ncs_secondary_price {
    font-size: 1.1em;
    display: block;
    text-align: left;
    font-weight: bold;
}

.dp-ncs-date-terms {
  display: flex;
  align-items: left;
  gap: 15px;
  flex-wrap: wrap;
}

/* new*/
.dp-ncs-type-title {
  font-size: var(--wp--preset--font-size--x-large);
  font-weight: bold;
  font-style: italic;
  display: block;
  text-align: left;
}

.dp-ncs-type-desc {
  font-size: var(--wp--preset--font-size--large);
  display: block;
  text-align: left;
}

.dp-ncs-type-list {
  font-size: var(--wp--preset--font-size--large);
  text-align: left;
}

.dp-ncs-type-desc-bold {
  font-size: var(--wp--preset--font-size--large);
  display: block;
  text-align: left;
  font-weight: bold;
  font-style: italic;
  margin-bottom: 12px;
}

.dp-ncs-type-desc-center {
  font-size: var(--wp--preset--font-size--large);
  display: block;
  text-align: center;
}

.dp-ncs-type-detail-left,
.dp-ncs-type-detail-center,
.dp-ncs-type-detail-right,
.dp-ncs-type-prix {
  font-size: var(--wp--preset--font-size--medium);
  display: block;
  color: #555;
  margin-top: 0.2em;
}

.dp-ncs-type-detail-left {
  text-align: left;
  margin-bottom: 10px;
}
.dp-ncs-type-detail-center {
  text-align: center;
}
.dp-ncs-type-detail-right {
  text-align: right;
  font-style: italic;
}
.dp-ncs-type-selection {
  font-size: var(--wp--preset--font-size--large);
  font-weight: bold;
}

.dp_ncs_checkbox {
  margin-bottom: 12px;
}

.dp-ncs-type-mini {
  font-size: 12px;
  display: block;
  color: #555;
  margin-top: 0.2em;
}

/* ─────────── RESPONSIVE ─────────── */

@media (max-width: 860px) {
  .dp-crud-container {
    padding: 15px;
  }

  .dp-input,
  .dp-textarea,
  .dp-button,
  select {
    font-size: 16px;
  }


  .button-group[data-name="subscription_type_ncs"] button,
  .button-group[data-name="place_ncs"] button {
    flex: 1 1 100%;
  }
}

/* ─────────── PRICE DISPLAY ─────────── */

#priceDisplayContainer {
  text-align: left;
}

#priceDisplay {
  font-size: 1.4em;
  font-weight: bold;
  display: inline-block;
}


/* ─────────── dp_new_client_message styles ─────────── */

.dp_client_msg_container {
  max-width: 600px;
  margin: 2rem auto;
  text-align: center;
}

.dp-msg-button {
  background: #fff;
  color: #000;
  padding: 1rem;
  font-size: 1rem;
  border: 1px;
  border-color: #ccc;
  border-radius: 8px;
  width: 100%;
  margin-bottom: 1rem;
  cursor: pointer;
}

.dp-msg-button.selected {
  background: #a12818;
}

.dp-msg-input {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.dp-msg-select {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 1rem;
  background-color: #fff;
 
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
  cursor: pointer;
}



.dp-msg-feedback {
  margin-top: 15px;
  padding: 10px;
  border-radius: 6px;
  display: none;
  font-weight: bold;
}

.dp-msg-feedback.dp_ncs_success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.dp-msg-feedback.dp_ncs_error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.dp-pause-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

.dp-pause-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dp-msg-date {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.dp-msg-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  resize: vertical;
  min-height: 140px;
  background: #fff;
  margin-bottom: 10px;
}

/* custom line table */
/* BATCH ALL CUSTOM TABLE */

.dp-batch-row {
    margin-bottom: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 5px;
    padding-right: 5px;
}

.dp-batch-row:nth-child(even) {
    background-color: var(--wp--preset--color--accent-2);
}

.dp-recipe-order-row {
    margin-bottom: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.dp-recipe-order-row:nth-child(even) {
    background-color: var(--wp--preset--color--accent-2);
}

.dp-recipe-title {
    font-size: var(--wp--preset--font-size--large);
    font-weight: bold;
    padding-top: 12px;
}

.dp-base-recipe-breakdown {
    background-color: var(--wp--preset--color--accent-2);
}

.dp-base-recipe-title, .dp-results {
    font-size: 18px;
    font-weight: bold;
}

.dp-base-recipe-details {
    font-size: 18px;
}

