/*******************************/
/* WooCommerce theme overrides */
/*******************************/

/* coupon form */
.woocommerce-form-coupon {
    position: relative;

    input {
        padding: .5rem 8rem .5rem .5rem !important;
        border-radius: 4px;
        display: block;
        width: 100%;
    }

    button {
        position: absolute;
        right: 0;
        top: -1px;
        font-size: 12px;
        font-weight: normal !important;
        letter-spacing: .05rem;
        border: 0;

        &:hover {
            background: var(--color-primary) !important;
        }
    }
}

/* vat field */

button.hc-vat-action,
.hc-checkout__link {
    display: table;
    margin-left: auto;
    background: grey;
    color: white;
    font-size: 12px;
    line-height: 1.2;
    padding: .618em 1em!important;
    border-radius: 3px;
    font-weight: normal !important;
    letter-spacing: .05rem;
    border: 0 !important;
    box-shadow: none;
    margin-left: auto;
    position: relative;
    cursor: pointer !important;

    &:hover {
        background: var(--color-primary) !important;
    }
}

/* vat message */

.hc-vat-message {
    font-size: 12px;

    &.is-valid {
        color: var(--color-valid);
        font-size: 12px;
    }

    &.is-error {
        color: var(--color-alert);
        font-size: 12px;
    }

}

/* vat loading spinner */
.hc-vat .woocommerce-input-wrapper {
    position: relative;
    display: block;
}

.hc-vat #billing_vat_id {
    padding-right: 36px;
}

.hc-vat.is-loading .woocommerce-input-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: hc-vat-spin 0.8s linear infinite;
    pointer-events: none;
}

/* address lookup spinner */
.hc-address-lookup .woocommerce-input-wrapper {
    position: relative;
    display: block;
}

.hc-address-lookup input {
    padding-right: 36px;
}

.hc-address-lookup.is-loading input {
    opacity: 0.7;
}

.hc-address-lookup.is-loading .woocommerce-input-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: hc-vat-spin 0.8s linear infinite;
    pointer-events: none;
}

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

/* progress thankyou */

.hc-thankyou__progress {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-gap: var(--space-xs);
    
    .hc-thankyou__step {
        background: white;
        padding: var(--space-xxs);
        border-radius: var(--border-radius-m);
        display: flex;
        align-items: center;
        line-height: 1;
        
        .hc-thankyou__step-circle {
            background: #eee;
            border: 1px solid #ccc;
            display: flex;
            width: 30px;
            aspect-ratio: 1/1;
            border-radius: 50%;
            align-items: center;
            justify-content: center;
            margin-right: 8px;
        }
        
        &.is-active {
            border: 2px solid var(--color-primary);
            
            .hc-thankyou__step-circle {
                border-color: var(--color-primary);
                background: var(--color-primary);
                color: white;
            }
        }
        
        
    }
}

/* status thankyou */

.status {
    margin-bottom: var(--space-xs);
    display: flex;
    gap: var(--space-xs);
    
    .status--order {
        border: 1px solid #63CE3A;
        background: #D5F2CA;
        padding: 8px 12px;
        border-radius: 8px;
    }
    
    .status--payment {
        border: 1px solid #AAAAAA;
        background: #EEEEEE;
        padding: 8px 12px;
        border-radius: 8px;
    }
}

/* ordermeta thankyou */

.order-meta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-xs);
    
    > div {
        border: 1px solid #ccc;
        padding: var(--space-xs);
        border-radius: 8px;
        
        div {font-size: 13px;}
        strong {
            font-size: 1rem;
        }
    }
}

/* productlijst thankyou */

.products-list  {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs)
}

/* met dl lijst thankyou page */

dl.dl-inline {
  display: grid;
  grid-template-columns: 220px 1fr; /* dt | dd */
  column-gap: 0;
  margin: 0;
  padding: 0;
}

/* <dl> als tabel-layout, horizontale lijn per dt+dd paar */
dl.dl-inline {
  display: grid;
  grid-template-columns: 160px 1fr; /* dt | dd */
  margin: 0;
  padding: 0;
}

dl.dl-inline dt,
dl.dl-inline dd {
  margin: 0;
  padding: 10px 0;
}

/* label */
dl.dl-inline dt {
  font-weight: 600;
}

/* desktop: lijn per rij (dt+dd samen) */
dl.dl-inline dt,
dl.dl-inline dd {
  border-bottom: 1px solid #e5e5e5;
}

/* laatste rij zonder lijn */
dl.dl-inline dt:last-of-type,
dl.dl-inline dd:last-child {
  border-bottom: 0;
}

/* mobiel: lijn alleen NA elk dt+dd paar */
@media (max-width: 600px) {
  dl.dl-inline {
    grid-template-columns: 1fr;
  }

  dl.dl-inline dt,
  dl.dl-inline dd {
    border-bottom: 0; /* reset */
  }

  dl.dl-inline dd {
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }

  /* laatste paar zonder lijn */
  dl.dl-inline dd:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  dl.dl-inline dt {
    padding-bottom: 4px;
  }

  dl.dl-inline dd {
    padding-top: 0;
  }
}


/* adressen */

.hc-thankyou__address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xs);
    
    .gridpanel {

        > div {
            border: 1px solid #ddd;
            border-radius: 4px;
            background: #F2F2F2;
            padding: var(--space-xs);
            min-height: 140px;

        }
    }
}


