/* --- BUTTONS STYLES FROM THEME --- */
.fw-partner-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: transparent;
    /*border: 1px solid rgba(255, 255, 255, 0.3);*/
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    line-height: 1.2;
}
.fw-partner-login-btn:hover {
    background-color: #fff;
    color: #333;
}
.fw-partner-login-btn svg { display: block; margin-bottom: 0; }

.fw-partner-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /*width: 38px;*/
    /*height: 38px;*/
    padding: 8px;
    border-radius: 50px;
    /*background: rgba(255,255,255,0.1);*/
    color: #000;
    transition: all 0.3s ease;
    text-decoration: none;
    /*border: 1px solid transparent;*/
    font-size: 13px;
    gap: 5px;
}
.fw-partner-logout-btn:hover {
    background: #ff4d4d;
    color: #fff;
    /*border-color: #ff4d4d;*/
    /*transform: scale(1.05);*/
}
.fw-partner-logout-btn svg { display: block; margin: 0; }
.ac-cm-user-actions { display: inline-flex; align-items: center; gap: 10px; }

/* --- MODAL STYLES (CUSTOM & ISOLATED) --- */
#ac-cm-front-modal { position: fixed; z-index: 99999; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; }
.ac-cm-front-overlay { position: absolute; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(3px); }

/* Стиль для Модального вікна */
.ac-cm-front-box { 
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); 
    background: #fff; width: 90%; max-width: 450px; padding: 30px; 
    border-radius: 8px; box-shadow: 0 15px 35px rgba(0,0,0,0.2); 
    z-index: 2; color: #333; text-align: left;
}
.fw-coop-btn { display: block; text-align: center; padding: 14px; background: #eee; color: #333; font-weight: 700; border-radius: 6px; text-decoration: none; border: none; cursor: pointer; width: 100%; font-size: 15px; transition: 0.2s; }
.fw-coop-btn.dark { background: #222; color: #fff; }
.fw-coop-btn:hover { background: #4f0606; color: #fff;}
/* Стиль для Вбудованої форми (на сторінці My Account) */
.ac-cm-inline-box {
    background: #fff; 
    width: 100%; 
    max-width: 480px; 
    padding: 30px; 
    margin: 0 auto;
    border-radius: 8px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.08); 
    color: #333; 
    text-align: left;
    border: 1px solid #eee;
}
.ac-cm-my-account-wrap {
    padding: 20px 0;
}

.ac-cm-close { 
    position: absolute; top: 12px; right: 12px; 
    background: none !important; border: none !important; 
    font-size: 28px; line-height: 1; cursor: pointer; color: #999; 
    padding: 0; margin: 0; width: auto; height: auto;
}
.ac-cm-close:hover { color: #333; }

/* Tabs */
.ac-cm-tabs-nav { display: flex; border-bottom: 1px solid #eee; margin-bottom: 25px; }
.ac-cm-tab-btn { 
    flex: 1; background: none; border: none; padding: 12px; 
    font-weight: 600; font-size: 15px; color: #777; cursor: pointer; 
    border-bottom: 2px solid transparent; margin-bottom: -1px; transition: 0.2s;
}
.ac-cm-tab-btn.active { color: #333; border-color: #007cba; }

/* Content */
.ac-cm-tab-content { display: none; }
.ac-cm-tab-content.active { display: block; }
.ac-cm-tab-content h3 { margin-top: 0; font-size: 18px; margin-bottom: 15px; color: #333; }

/* Custom Inputs & Form */
.ac-cm-form-row { margin-bottom: 15px; }
.ac-cm-form-row label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; color: #444; }

/* INPUT RESET & STYLE */
input.ac-cm-input {
    display: block; width: 100%; box-sizing: border-box;
    padding: 10px 12px !important;
    font-size: 16px !important; line-height: 1.4;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    background: #fff !important;
    color: #333 !important;
    box-shadow: none !important; margin: 0;
}
input.ac-cm-input:focus { border-color: #007cba !important; outline: none; }

/* PASSWORD TOGGLE */
.ac-cm-pwd-wrap { position: relative; }
.ac-cm-pwd-wrap input.ac-cm-input { padding-right: 40px !important; }
.ac-cm-pwd-toggle {
    position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
    cursor: pointer; color: #999; line-height: 0; padding: 5px;
}
.ac-cm-pwd-toggle:hover { color: #555; }

/* BUTTON RESET & STYLE */
button.ac-cm-btn {
    display: block; width: 100%;
    padding: 12px !important;
    font-size: 15px !important; font-weight: 600;
    color: #fff !important; background: #222 !important;
    border: none !important; border-radius: 4px !important;
    cursor: pointer; transition: background 0.2s;
    text-transform: none; margin-top: 10px;
}
button.ac-cm-btn:hover { background: #444 !important; }

/* Misc */
.ac-cm-sub-tabs { background: #f5f5f5; padding: 10px; text-align: center; border-radius: 4px; margin-bottom: 20px; }
.ac-cm-sub-tabs label { margin: 0 10px; cursor: pointer; font-weight: 500; font-size: 14px; }
.ac-cm-note { font-size: 13px; color: #777; margin-top: 15px; text-align: center; font-style: italic; }
.ac-cm-forgot { margin-top: 10px; text-align: center; font-size: 13px; }
.ac-cm-icon-link { display: inline-flex; padding: 5px; align-items: center; justify-content: center; color: inherit; text-decoration: none; }
div:where(.swal2-container) {
    z-index: 99999 !important;
}
/* Ім'я користувача в хедері */
.ac-cm-user-name {
    margin-left: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    display: inline-block;
}

/* Якщо екран дуже вузький, можна ховати ім'я */
@media (max-width: 480px) {
    .ac-cm-user-name { display: none; }
}

/* --- COOP MODAL STYLES --- */
.ac-cm-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 100000;
    align-items: center; justify-content: center; backdrop-filter: blur(3px);
}
.ac-cm-modal-box {
    background: #fff; padding: 40px; border-radius: 10px; width: 90%; max-width: 450px;
    position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.3); text-align: center;
}
.ac-cm-modal-close {
    position: absolute; top: 10px; right: 15px; font-size: 28px; border: none;
    background: none; cursor: pointer; color: #999; line-height: 1;
}
.ac-cm-modal-box h3 { margin-top: 0; color: #333; }
.ac-cm-modal-box p { color: #666; font-size: 14px; margin-bottom: 20px; }

.ac-cm-form-group { margin-bottom: 15px; text-align: left; }
.ac-cm-form-group label { display: block; font-size: 12px; font-weight: bold; margin-bottom: 5px; color: #444; }
.ac-cm-form-group input {
    width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px;
}
.ac-cm-submit-btn {
    width: 100%; padding: 12px; background: #e31e24; color: #fff; border: none;
    border-radius: 4px; font-weight: bold; cursor: pointer; transition: 0.2s;
}
.ac-cm-submit-btn:hover { background: #c0151a; }

.ac-cm-msg { margin-top: 10px; font-size: 13px; }
.ac-cm-msg.success { color: green; }
.ac-cm-msg.error { color: red; }

/* Pulse Animation for Button */
.pulse-btn { animation: ac-cm-pulse 2s infinite; }
@keyframes ac-cm-pulse {
    0% { box-shadow: 0 0 0 0 rgba(227, 30, 36, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(227, 30, 36, 0); }
    100% { box-shadow: 0 0 0 0 rgba(227, 30, 36, 0); }
}

/* --- UNIVERSAL USER PANEL STYLES --- */

/* 1. DESKTOP VIEW (Compact Row) */
.ac-cm-desktop-panel {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.ac-cm-d-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    color: inherit;
    transition: opacity 0.2s;
}
.ac-cm-d-link:hover { opacity: 0.8; color: #007cba; }
.ac-cm-d-link svg { flex-shrink: 0; }

.ac-cm-d-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.ac-cm-d-text .name {
    font-weight: 600;
    font-size: 14px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-cm-d-text .role {
    font-size: 10px;
    text-transform: uppercase;
    color: #888;
}
.ac-cm-d-link.logout {
    padding: 5px;
    margin-left: 5px;
    color: #999;
}
.ac-cm-d-link.logout:hover { color: #e31e24; }

/* 2. MOBILE VIEW (Card Layout) */
.ac-cm-mobile-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-bottom: 20px;
}

/* Logged In State */
.ac-cm-m-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}
.ac-cm-m-avatar img {
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: block;
}
.ac-cm-m-info {
    display: flex;
    flex-direction: column;
}
.ac-cm-m-info .greeting { font-size: 11px; color: #777; }
.ac-cm-m-info .name { font-size: 16px; color: #222; margin-bottom: 2px; }
.ac-cm-m-info .badge {
    font-size: 10px; 
    text-transform: uppercase; 
    font-weight: bold; 
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
}
.ac-cm-m-info .badge.partner { background: #007cba; color: #fff; }
.ac-cm-m-info .badge.retail { background: #eee; color: #555; }

/* Guest State */
.ac-cm-m-guest-header { text-align: center; margin-bottom: 15px; }
.ac-cm-m-logo img { max-width: 120px; height: auto; display: block; margin: 0 auto 8px; }
.ac-cm-m-guest-header p { font-size: 13px; color: #777; margin: 0; }

/* Mobile Buttons */
.ac-cm-m-actions { display: flex; gap: 10px; }
.ac-cm-m-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: 0.2s;
    cursor: pointer;
    border: none;
}
.ac-cm-m-btn.primary {
    background: #007cba;
    color: #fff;
}
.ac-cm-m-btn.secondary {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}
.ac-cm-m-btn.full { width: 100%; }
.ac-cm-m-btn:hover { opacity: 0.9; }

/* --- B2B SMART BANNER --- */
.ac-cm-b2b-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #222; /* Темний професійний колір */
    color: #fff;
    text-align: center;
    padding: 12px 15px;
    z-index: 99990; /* Поверх меню, але під модалками */
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.ac-cm-b2b-banner a {
    color: #4dc0ff; /* Світло-синій для контрасту */
    text-decoration: underline;
    font-weight: bold;
    transition: 0.2s;
}
.ac-cm-b2b-banner a:hover { color: #fff; }



/* --- B2B SOFT GATE MODAL --- */
.ac-cm-b2b-modal-box {
    text-align: center;
    padding: 40px 30px !important;
}
.ac-cm-b2b-modal-box h3 {
    font-size: 22px;
    margin-bottom: 15px;
}
.ac-cm-b2b-modal-desc {
    font-size: 15px;
    color: #444;
    line-height: 1.5;
    margin-bottom: 25px;
}
.ac-cm-b2b-guest-link {
    display: inline-block;
    color: #777;
    font-size: 14px;
    text-decoration: underline;
    margin-top: 10px;
    transition: 0.2s;
}
.ac-cm-b2b-guest-link:hover { color: #222; }
.ac-cm-b2b-retail-note {
    font-size: 12px;
    color: #999;
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.ac-cm-no-price {
    font-size: 14px !important;
}