/* ICD RFQ Widget v1.0 - Clean CSS */

/* ---- Floating Toggle Button ---- */
.icd-rfq-toggle {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 99999 !important;
    height: 56px !important;
    width: 56px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #4D067B !important;
    border: none !important;
    color: #fff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;

    font-family: Inter, -apple-system, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 16px rgba(77,6,123,0.35) !important;
    transition: all 0.25s ease !important;
    justify-content: center !important;
}
.icd-rfq-toggle:hover {
    background: #3A0460 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 6px 24px rgba(77,6,123,0.45) !important;
}
.icd-rfq-toggle svg {
    width: 28px !important;
    height: 28px !important;
    stroke: #fff !important;
    fill: none !important;
    flex-shrink: 0 !important;
}
.icd-rfq-toggle-label { white-space: nowrap; }

/* ---- Panel ---- */
.icd-rfq-panel {
    position: fixed !important;
    bottom: 84px !important;
    right: 24px !important;
    z-index: 99998 !important;
    width: 400px !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    background: #fff !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18) !important;
    font-family: Inter, -apple-system, sans-serif !important;
}

/* ---- Header ---- */
.icd-rfq-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
}
.icd-rfq-header-text h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0 0 4px;
}
.icd-rfq-header-text p {
    font-size: 13px;
    color: #888;
    margin: 0;
}
.icd-rfq-close {
    background: none;
    border: none;
    font-size: 26px;
    color: #bbb;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.icd-rfq-close:hover { color: #333; }

/* ---- Form ---- */
.icd-rfq-form { padding: 16px 20px 20px; }
.icd-rfq-field { margin-bottom: 14px; }
.icd-rfq-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}
.icd-rfq-field label .required { color: #e53935; }
.icd-rfq-field input[type="text"],
.icd-rfq-field input[type="email"],
.icd-rfq-field input[type="tel"],
.icd-rfq-field textarea,
.icd-rfq-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: Inter, -apple-system, sans-serif;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: #fff;
    color: #333;
}
.icd-rfq-field input:focus,
.icd-rfq-field textarea:focus,
.icd-rfq-field select:focus {
    border-color: #4D067B;
    box-shadow: 0 0 0 3px rgba(77,6,123,0.08);
}
.icd-rfq-field textarea { resize: vertical; min-height: 80px; max-height: 200px; }
.icd-rfq-field.has-error input,
.icd-rfq-field.has-error textarea { border-color: #e53935; }
.icd-rfq-error-msg { color: #e53935; font-size: 12px; margin-top: 4px; }

/* Row (email + phone) */
.icd-rfq-row { display: flex; gap: 12px; }
.icd-rfq-row .icd-rfq-field { flex: 1; }

/* Submit */
.icd-rfq-submit-btn {
    width: 100%;
    padding: 13px;
    background: #4D067B;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: Inter, -apple-system, sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 6px;
}
.icd-rfq-submit-btn:hover { background: #3A0460; }
.icd-rfq-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* File upload */
.icd-rfq-upload-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 13px;
    color: #888;
}
.icd-rfq-upload-zone:hover { border-color: #4D067B; background: #f5edf8; }
.icd-rfq-file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f8f8;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 8px;
}
.icd-rfq-file-remove {
    background: none;
    border: none;
    color: #e53935;
    cursor: pointer;
    font-size: 16px;
}

/* Trust + WA link */
.icd-rfq-trust { text-align: center; font-size: 12px; color: #999; margin-top: 12px; }
.icd-rfq-wa-link { display: block; text-align: center; font-size: 13px; color: #888; margin-top: 10px; text-decoration: none; }
.icd-rfq-wa-link:hover { color: #25D366; }

/* Success */
.icd-rfq-success { padding: 40px 20px; text-align: center; }
.icd-rfq-success-icon {
    width: 56px; height: 56px; margin: 0 auto 16px;
    background: #4CAF50; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.icd-rfq-success-icon svg { stroke: #fff; width: 28px; height: 28px; fill: none; }
.icd-rfq-success h3 { font-size: 20px; color: #111; margin: 0 0 8px; }
.icd-rfq-success p { font-size: 14px; color: #666; margin: 0 0 4px; }

/* Suggestions */
.icd-rfq-parts-wrap { position: relative; }
.icd-rfq-suggestions {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 200px; overflow-y: auto; z-index: 100;
}
.icd-rfq-suggestion-item {
    padding: 10px 14px; cursor: pointer;
    border-bottom: 1px solid #f5f5f5; font-size: 13px;
}
.icd-rfq-suggestion-item:hover { background: #f5edf8; }

/* Selected parts */
.icd-rfq-selected-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.icd-rfq-part-tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; background: #f5edf8; border-radius: 6px;
    font-size: 12px; color: #4D067B; font-weight: 500;
}
.icd-rfq-part-tag button { background: none; border: none; color: #999; cursor: pointer; font-size: 14px; padding: 0; }

/* Honeypot */
.icd-rfq-hp { position: absolute; left: -9999px; }

/* WhatsApp button — bottom LEFT (RFQ widget is bottom RIGHT) */
.icd-whatsapp-float { left: 24px !important; right: auto !important; display: flex !important; }

/* Mobile */
@media (max-width: 600px) {
    .icd-rfq-toggle { bottom: 16px !important; right: 16px !important; width: 50px !important; height: 50px !important; } .icd-rfq-toggle svg { width: 24px !important; height: 24px !important; }
    .icd-rfq-panel {
        width: 100% !important;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        max-height: 90vh !important;
        border-radius: 16px 16px 0 0 !important;
    }
    .icd-rfq-row { flex-direction: column; gap: 0; }
}
@media (max-width: 900px) {
    .icd-rfq-panel { width: 380px !important; }
}
