/* Product Page Preview */
#wtc-product-page-preview {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eee;
    background: #fff;
    text-align: center;
    border-radius: 8px;
}
#wtc-preview-image {
    width: 200px;
    height: auto;
    border: 1px solid #ddd;
    display: inline-block;
    border-radius: 4px;
}

/* Button */
#wtc-open-modal {
    width: 100%;
    margin-bottom: 20px;
    background-color: #5D4037 !important;
    color: #fff !important;
    padding: 15px !important;
    font-weight: bold;
}

/* Modal */
#wtc-modal-overlay {
    position: fixed; z-index: 999999; left: 0; top: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.85);
    display: flex; align-items: center; justify-content: center;
}
#wtc-modal-content {
    background: #fff; padding: 25px; border-radius: 12px;
    width: 95%; max-width: 900px; max-height: 95vh;
    overflow: hidden; position: relative;
    display: flex; flex-direction: column;
}
#wtc-close-modal { position: absolute; right: 20px; top: 15px; font-size: 28px; cursor: pointer; }

/* Instruction text margin */
#wtc-modal-content p {
    margin-bottom: 0.0em;
}

/* Layout */
#wtc-modal-body {
    display: flex; flex-direction: row; gap: 30px;
    margin-top: 20px; overflow-y: auto; align-items: flex-start;
}
#wtcCanvas {
    width: 300px !important; height: 300px !important;
    border: 1px solid #ccc; flex-shrink: 0;
    cursor: move;
    touch-action: none;
}
#wtc-controls { flex: 1; min-width: 300px; }

/* ACCORDION STYLES */
#wtc-accordion-wrapper { 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
    margin-bottom: 0px; /* Changed from 10px to 0px */
}
.wtc-accordion-trigger {
    background: #f1f1f1; padding: 10px 15px; border: 1px solid #ddd;
    border-radius: 6px; cursor: pointer; display: flex;
    justify-content: space-between; align-items: center; font-weight: bold;
}
.wtc-accordion-trigger.active { background: #5D4037; color: #fff; }
.wtc-line-title small { font-weight: normal; font-style: italic; opacity: 0.7; margin-left: 10px; }

#wtc-add-line-btn {
    width: 100%; background: transparent !important; color: #5D4037 !important;
    border: 2px dashed #5D4037 !important; padding: 10px !important;
    border-radius: 6px; cursor: pointer; font-weight: bold; margin-top: 5px;
}
#wtc-add-line-btn:hover { background: #fdf8f7 !important; }

/* Control Styling - Tightened Spacing */
.line-control { 
    background: #f9f9f9; 
    padding: 8px 10px; 
    border: 1px solid #eee; 
    border-radius: 6px; 
    border-top: none; 
    border-top-left-radius: 0; 
    border-top-right-radius: 0; 
}
.input-row { display: flex; gap: 8px; margin-bottom: 4px; }
.wtc-input { flex: 2; height: 35px !important; }
.wtc-font-select { flex: 1; height: 35px !important; font-size: 14px !important; }

.range-row { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 12px; 
    margin-top: 0px;
    margin-bottom:0px;
}
.range-row label { min-width: 90px; font-weight: bold; line-height: 1; }
.range-row label span { color: #5D4037; }
.range-row input { flex: 1; margin: 0; padding: 0; }

#wtc-save-design { 
    width: 100%; 
    padding: 15px !important; 
    margin-top: 0px; /* Changed from 15px to 0px to remove the 25px gap */
    background: #5D4037 !important; 
    color: #fff !important; 
    font-weight: bold; 
}

@media (max-width: 850px) {
    #wtc-modal-body { flex-direction: column; align-items: center; }
}

/* Font styles */
.wtc-font-select option[value="Arial"] { font-family: Arial, sans-serif; }
.wtc-font-select option[value="Playfair Display"] { font-family: 'Playfair Display', serif; }
.wtc-font-select option[value="Merriweather"] { font-family: 'Merriweather', serif; }
.wtc-font-select option[value="Roboto"] { font-family: 'Roboto', sans-serif; }
.wtc-font-select option[value="Montserrat"] { font-family: 'Montserrat', sans-serif; }
.wtc-font-select option[value="Open Sans"] { font-family: 'Open Sans', sans-serif; }
.wtc-font-select option[value="Oswald"] { font-family: 'Oswald', sans-serif; }
.wtc-font-select option[value="Lobster"] { font-family: 'Lobster', cursive; }
.wtc-font-select option[value="Pacifico"] { font-family: 'Pacifico', cursive; }
.wtc-font-select option[value="Dancing Script"] { font-family: 'Dancing Script', cursive; }
.wtc-font-select option[value="Great Vibes"] { font-family: 'Great Vibes', cursive; }
.wtc-font-select option[value="Satisfy"] { font-family: 'Satisfy', cursive; }
.wtc-font-select option[value="Bangers"] { font-family: 'Bangers', cursive; }
.wtc-font-select option[value="Righteous"] { font-family: 'Righteous', cursive; }
.wtc-font-select option[value="Permanent Marker"] { font-family: 'Permanent Marker', cursive; }