/* ANDA Configurator - Frontend Styles v1.7 */

/* ── Price result box ──────────────────────────────────────────────────────── */
#anda-price-box {
    background: linear-gradient(135deg, #f8f9ff 0%, #eef1ff 100%);
    border: 2px solid #4f46e5;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 20px 0 0;
    box-shadow: 0 4px 16px rgba(79,70,229,.1);
}
.anda-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}
.anda-total-row        { border-top: 1px solid #d1d5db; margin-top: 8px; padding-top: 12px; }
.anda-price-label      { color: #6b7280; font-size: 14px; }
.anda-price-value      { font-size: 22px; color: #1f2937; }
.anda-price-value-total{ font-size: 28px; color: #4f46e5; font-weight: 700; }
.anda-stock-row        { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e5e7eb; }
.anda-stock-label      { font-size: 13px; color: #059669; }

/* ── "Από Xε" in the WC price area ────────────────────────────────────────── */
.anda-from-price {
    font-size: 15px;
    color: #4f46e5;
    font-weight: 600;
    display: block;
    margin-top: 4px;
}

/* ── Configurator Wrapper ──────────────────────────────────────────────────── */
.anda-conf-wrapper {
    margin: 24px 0;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.anda-conf-inner    { padding: 24px; }
.anda-conf-title    { font-size: 18px; font-weight: 700; color: #1f2937; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.anda-conf-subtitle { color: #6b7280; font-size: 14px; margin: 0 0 20px; }
.anda-conf-loading  { padding: 30px; text-align: center; color: #9ca3af; font-size: 15px; }

/* ── Positions Grid ────────────────────────────────────────────────────────── */
.anda-positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.anda-print-position {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
}
.anda-print-position.active {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.anda-pos-header { padding: 14px; cursor: pointer; display: flex; align-items: flex-start; gap: 10px; }
.anda-pos-header input[type="checkbox"] {
    width: 18px; height: 18px; margin-top: 4px; cursor: pointer;
    accent-color: #4f46e5; flex-shrink: 0;
}
.anda-pos-header label { cursor: pointer; display: flex; align-items: center; gap: 10px; flex: 1; }
.anda-pos-img {
    width: 64px; height: 64px; object-fit: cover;
    border-radius: 8px; border: 1px solid #e5e7eb; flex-shrink: 0;
}
.anda-pos-name { font-size: 14px; color: #374151; line-height: 1.4; }

/* ── Position Options ──────────────────────────────────────────────────────── */
.anda-pos-options {
    padding: 14px;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
}
.anda-field            { margin-bottom: 14px; }
.anda-field:last-child { margin-bottom: 0; }
.anda-field label {
    display: block; font-size: 12px; font-weight: 600; color: #6b7280;
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px;
}
.anda-tech-select, .anda-colors-input {
    width: 100%; padding: 9px 12px; border: 1px solid #d1d5db;
    border-radius: 8px; font-size: 14px; background: #fff;
    outline: none; transition: border-color .2s; box-sizing: border-box;
}
.anda-tech-select:focus, .anda-colors-input:focus { border-color: #4f46e5; }
.anda-colors-input  { width: 100px; }
.anda-input-warn    { border-color: #f59e0b !important; background: #fffbeb; }
.anda-colors-row    { display: flex; align-items: center; gap: 10px; }
.anda-colors-help {
    width: 22px; height: 22px; border-radius: 50%;
    background: #e5e7eb; color: #6b7280;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; cursor: help; position: relative;
}
.anda-tooltip {
    display: none; position: absolute; bottom: 28px; left: 50%;
    transform: translateX(-50%);
    background: #1f2937; color: #fff; padding: 8px 12px; border-radius: 8px;
    font-size: 12px; width: 220px; text-align: center; z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,.2); pointer-events: none;
}
.anda-colors-help:hover .anda-tooltip { display: block; }
.anda-color-warn {
    background: #fffbeb; border: 1px solid #fbbf24;
    color: #92400e; padding: 8px 12px; border-radius: 8px;
    font-size: 13px; margin-top: 8px;
}
.anda-embroidery-notice {
    background: #fef3c7; border: 1px solid #fbbf24;
    color: #92400e; padding: 10px 14px; border-radius: 8px;
    font-size: 13px; margin: 8px 0;
}

/* ── Upload ────────────────────────────────────────────────────────────────── */
.anda-upload-area {
    border: 2px dashed #d1d5db; border-radius: 10px; padding: 14px;
    text-align: center; cursor: pointer;
    transition: border-color .2s, background .2s; background: #f9fafb;
}
.anda-upload-area:hover, .anda-upload-area.drag-over { border-color: #4f46e5; background: #f0f3ff; }
.anda-upload-btn     { font-size: 14px; color: #4f46e5; font-weight: 600; margin-bottom: 4px; }
.anda-upload-help    { font-size: 11px; color: #9ca3af; margin: 4px 0 0; }
.anda-upload-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.anda-file-tag       { background: #e0e7ff; color: #3730a3; padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.anda-detecting      { color: #6b7280; font-size: 13px; font-style: italic; }

/* ── Color detection result ────────────────────────────────────────────────── */
.anda-detected {
    background: #f0fdf4; border: 1px solid #86efac;
    padding: 10px 12px; border-radius: 8px; margin-top: 8px;
}
.anda-detected-top {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 8px; flex-wrap: wrap;
}
.anda-detected-top > span { font-size: 13px; color: #166534; }
.anda-detected-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* Color swatches */
.anda-swatches {
    display: flex; gap: 5px; flex-wrap: wrap; align-items: center;
}
.anda-swatch {
    display: inline-block;
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.15);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: help;
    flex-shrink: 0;
}

.anda-accept-colors, .anda-reject-colors {
    padding: 5px 14px; border-radius: 6px; font-size: 12px;
    cursor: pointer; border: 1px solid; margin-right: 6px;
}
.anda-accept-colors       { background: #16a34a; color: #fff; border-color: #16a34a; }
.anda-accept-colors:hover { background: #15803d; }
.anda-reject-colors       { background: #fff; color: #374151; border-color: #d1d5db; }
.anda-reject-colors:hover { background: #f3f4f6; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .anda-positions-grid    { grid-template-columns: 1fr; }
    .anda-price-value       { font-size: 18px; }
    .anda-price-value-total { font-size: 22px; }
}
