@use 'shipping-days-setting';
@use 'shipping-class-page';
@use 'custom-fields';
@use 'translation-page';
@use 'troubleshoot-page';
@use 'dynamic-method-page';

.pi-disable-field{
  position:relative;
}

.pi-disable-field:after{
  content:"";
  display:block;
  position:absolute;
  left:0px;
  top:0px;
  width:100%;
  height:100%;
  background: rgba(255,255,255,0.7);
}

.pi-edd-current-time-box {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;

    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);

    font-size: 12px;
    line-height: 1.5;
    color: #555;
}

.pi-edd-current-time-box strong {
    color: #333;
    font-size: 12px;
}

.pi-edd-current-time-box a {
    color: #2271b1;
    text-decoration: none;
}

.pi-edd-current-time-box a:hover {
    text-decoration: underline;
}

/* Hide border */

body:has(#pi_product_border_style option[value="none"]:checked){ 
    #row_pi_product_border,
    #row_pi_product_border_radius{
        display:none;
    }
}

body:has(#pi_loop_border_style option[value="none"]:checked){ 
    #row_pi_loop_border,
    #row_pi_loop_border_radius{
        display:none;
    }
}

body:has(#pi_cart_border_style option[value="none"]:checked){ 
    #row_pi_cart_border,
    #row_pi_cart_border_radius{
        display:none;
    }
}

/* Preset preview */
#preset-preview-container{ 
    display:block;
    height:50px;
    width:230px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

@for $i from 1 through 11 {
    body:has(#preset-template-template option[value="template-#{$i}"]:checked)
    #preset-preview-container {
        background-image: url('../img/presets/preset-#{$i}.png');
    }
}

body:has(#preset-template-template option[value=""]:checked) #preset-preview-container{ 
    display:none;
}

/* Days Left Until Special Day */

#row_pi_edd_special_day_date, #row_pi_edd_special_day_start, #row_pi_edd_special_day_message{
    display:none;
}

body:has(#pi_edd_enable_special_day_message:checked){
    #row_pi_edd_special_day_date, #row_pi_edd_special_day_start, #row_pi_edd_special_day_message{
        display:grid;
    }
}