.sfac-button {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: transparent !important; 
    padding: 0 !important;
    cursor: pointer;
    z-index: 9999;
}
img.sfac-icon {
    width: 55px;
    height: 55px;
    display: inline-block;
    animation: sfac-bounce 1.2s ease-in-out infinite;
}
@keyframes sfac-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

.sfac-button-label {
  font-size: 12px;
  font-weight: 600;
  color: #000;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}
.sfac-panel {
    position: fixed;
    right: 24px;
    bottom: 90px;
    width: 380px;
    height: 600px;
    max-height: 85vh;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.25s ease;
}
.sfac-panel.open {
    opacity: 1;
    transform: translateY(0);
}
.sfac-header {
    padding: 16px;
    background: linear-gradient(135deg,#0073aa,#005f8d);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sfac-close {
    cursor: pointer;
    font-size: 18px;
}
.sfac-messages {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    background: #f9fafb;
}
.sfac-form {
    padding: 10px;
    display: flex;
    gap: 8px;
    border-top: 1px solid #eee;
    background: #fff;
}
.sfac-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid #ddd;
    outline: none;
}
.sfac-input:focus { border-color: #0073aa; }
.sfac-send {
    padding: 10px 16px;
    border-radius: 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
}
.sfac-msg {
    margin: 8px 0;
    padding: 10px 14px;
    border-radius: 16px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}
.sfac-msg.me {
    background: #0073aa;
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}
.sfac-msg.bot {
    background: #eaeef3;
    color: #222;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

/* ===== Kanri bangou form ===== */
.sfac-kanri-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sfac-kanri-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}
.sfac-kanri-input:focus { outline: none; border-color: #0073aa; }
.sfac-kanri-submit {
    padding: 8px 0;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
}
.sfac-kanri-submit:disabled {
    background: #7aafcc;
    cursor: default;
}

/* ===== Address confirmation dialog ===== */
.sfac-addr-confirm {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sfac-addr-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a3a5c;
    margin-bottom: 2px;
}
.sfac-addr-info {
    background: #fff;
    border: 1px solid #d0dce8;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sfac-addr-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
}
.sfac-addr-label {
    color: #666;
    white-space: nowrap;
    min-width: 60px;
    font-weight: 500;
}
.sfac-addr-val {
    color: #222;
    flex: 1;
    word-break: break-all;
}
.sfac-addr-btns {
    display: flex;
    gap: 8px;
}
.sfac-addr-btn {
    flex: 1;
    padding: 9px 0;
    border-radius: 6px;
    border: 2px solid #0073aa;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.sfac-addr-yes {
    background: #0073aa;
    color: #fff;
}
.sfac-addr-yes:hover { background: #005f8d; }
.sfac-addr-no {
    background: #fff;
    color: #0073aa;
}
.sfac-addr-no:hover { background: #e8f4fb; }
.sfac-addr-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ===== Shared form styles ===== */
.sfac-appoint {
    background-color: none;
    margin-top: 5px;
}
.sfac-appoint input {
    width: 100%;
    padding: 6px;
    margin-top: 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.sfac-appoint input,
.sfac-appoint button {
    box-sizing: border-box;
}
.sfac-appoint textarea {
    width: 100%;
    padding: 6px;
    margin-top: 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    resize: none;
}
.sfac-form-message {
    max-width: 85% !important;
    width: 85% !important;
}
.sfac-submit {
    margin-top: 10px;
    width: 100%;
    padding: 8px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}
.sfac-disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* ===== Inquire category selection ===== */
.sfac-cat-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -4px -4px 10px -4px;
}
.sfac-cat-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 4px;
    width: calc(50% - 8px);
    cursor: pointer;
    text-align: left;
    font-size: 13px;
    color: #222;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s, border-color 0.15s;
    box-sizing: border-box;
}
.sfac-cat-btn:hover {
    background: #f0f6fb;
    border-color: #0073aa;
}
.sfac-cat-label {
    font-weight: 600;
    font-size: 13px;
}
.sfac-cat-sub {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}
.sfac-arrow {
    font-size: 13px;
    color: #aaa;
}
.sfac-step-hint {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}
.sfac-back-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.sfac-badge {
    background: #e3eeff;
    color: #1a5fbc;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
}
.sfac-back {
    font-size: 12px;
    color: #888;
    cursor: pointer;
}
.sfac-back:hover { color: #333; }
.sfac-kanri-back-row {
    margin-top: 10px;
    text-align: center;
}
.sfac-kanri-back {
    font-size: 12px;
    color: #888;
    cursor: pointer;
}
.sfac-kanri-back:hover {
    color: #555;
}
/* ===== Toner quantity inputs ===== */
.sfac-toner-section { margin-top: 10px; }
.sfac-toner-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 6px -3px 0 -3px;
}
.sfac-toner-grid > div {
    display: flex;
    flex-direction: column;
    width: calc(50% - 6px);
    margin: 3px;
    box-sizing: border-box;
}
.sfac-toner-grid input {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}
.toner-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 3px;
}
.toner-b { background: #848282; color: #333; }
.toner-c { background: #91e8e8; color: #0a6b6b; }
.toner-m { background: #e7a2c4; color: #8b1a52; }
.toner-y { background: #fff5b3; color: #7a6200; }
.toner-d { background: #f0f0f0; color: #555; }

/* ===== Loading dots ===== */
.sfac-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 2px;
}
.sfac-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(145deg, #0176D3, #0B5CAB);
    display: inline-block;
    animation: sfac-bounce 1.4s infinite ease-in-out both;
    box-shadow: 0 0 6px rgba(1,118,211,0.4), 0 2px 4px rgba(0,0,0,0.15);
}
.sfac-dots span:nth-child(1) { animation-delay: -0.32s; }
.sfac-dots span:nth-child(2) { animation-delay: -0.16s; }
.sfac-dots span:nth-child(3) { animation-delay: 0s; }

/* ===== Toast ===== */
.sfac-toast {
    position: fixed;
    bottom: 90px;
    right: 24px;
    background: #1a7a3c;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 99999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    max-width: 280px;
}
.sfac-toast.sfac-toast-show { opacity: 1; transform: translateY(0); }
.sfac-toast.sfac-toast-error { background: #bc3b3b; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sfac-panel {
        top: 0; right: 0; bottom: 0;
        width: 100vw;
        height: auto;
        max-height: 100vh;
        border-radius: 0;
    }
    .sfac-button { bottom: 20px; right: 20px; }
    body.sfac-open { overflow: hidden; }

    .sfac-cat-btn {
        padding: 10px 8px;
        font-size: 12px;
        width: calc(50% - 8px);
    }
    .sfac-toner-grid > div { width: calc(50% - 6px); }
    .sfac-addr-btn { padding: 10px 0; font-size: 14px; }
}

/* ===== Urgent toner checkbox ===== */
.sfac-urgent-label {
    font-size: 11px;
    color: #ab481d;
    font-weight: 500;
    line-height: 1.4;
    padding: 6px 8px;
    background: #fff7f0;
    border: 1px solid #f5c08a;
    border-radius: 6px;
    margin-top: 8px;
    box-sizing: border-box;
    width: 100%;
}
.sfac-urgent-chk {
    accent-color: #b94a00;
    width: 15px !important;
    height: 15px;
    flex-shrink: 0;
}