.shahrvand-contact-widget {
    position: fixed;
    z-index: 99999;
    --shahrvand-contact-button-size: 60px;
    --shahrvand-contact-side-offset: 20px;
    --shahrvand-contact-bottom-offset: 20px;
    --shahrvand-contact-panel-width: 330px;
    --shahrvand-contact-header-bg: #1f2937;
    --shahrvand-contact-button-bg: #16a34a;
    --shahrvand-contact-icon-color: #ffffff;
    --shahrvand-contact-text-color: #1f2937;
    --shahrvand-contact-bg-color: #ffffff;
    --shahrvand-contact-radius: 18px;
    --shahrvand-contact-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    --shahrvand-contact-animation-speed: 300ms;
}

.shahrvand-contact-widget--bottom-right {
    right: var(--shahrvand-contact-side-offset);
    bottom: var(--shahrvand-contact-bottom-offset);
}

.shahrvand-contact-widget--bottom-left {
    left: var(--shahrvand-contact-side-offset);
    bottom: var(--shahrvand-contact-bottom-offset);
}

.shahrvand-contact-widget--top-right {
    right: var(--shahrvand-contact-side-offset);
    top: var(--shahrvand-contact-bottom-offset);
}

.shahrvand-contact-widget--top-left {
    left: var(--shahrvand-contact-side-offset);
    top: var(--shahrvand-contact-bottom-offset);
}

.shahrvand-contact-button {
    width: var(--shahrvand-contact-button-size);
    height: var(--shahrvand-contact-button-size);
    border: none;
    border-radius: 50%;
    background: var(--shahrvand-contact-button-bg);
    color: var(--shahrvand-contact-icon-color);
    box-shadow: var(--shahrvand-contact-shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transition: transform var(--shahrvand-contact-animation-speed) ease;
}

.shahrvand-contact-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.shahrvand-contact-button__icon {
    font-size: calc(var(--shahrvand-contact-button-size) * 0.42);
    line-height: 1;
}

.shahrvand-contact-panel {
    position: absolute;
    width: var(--shahrvand-contact-panel-width);
    background: var(--shahrvand-contact-bg-color);
    border-radius: var(--shahrvand-contact-radius);
    box-shadow: var(--shahrvand-contact-shadow);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    transform: translateY(12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--shahrvand-contact-animation-speed) ease, transform var(--shahrvand-contact-animation-speed) ease, visibility var(--shahrvand-contact-animation-speed) ease;
}

.shahrvand-contact-widget.is-open .shahrvand-contact-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.shahrvand-contact-widget--bottom-right .shahrvand-contact-panel {
    bottom: calc(var(--shahrvand-contact-button-size) + 10px);
    right: 0;
}

.shahrvand-contact-widget--bottom-left .shahrvand-contact-panel {
    bottom: calc(var(--shahrvand-contact-button-size) + 10px);
    left: 0;
}

.shahrvand-contact-widget--top-right .shahrvand-contact-panel {
    top: calc(var(--shahrvand-contact-button-size) + 10px);
    right: 0;
}

.shahrvand-contact-widget--top-left .shahrvand-contact-panel {
    top: calc(var(--shahrvand-contact-button-size) + 10px);
    left: 0;
}

.shahrvand-contact-panel__header {
    background: var(--shahrvand-contact-header-bg);
    color: var(--shahrvand-contact-icon-color);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
}

.shahrvand-contact-panel__title {
    font-size: 15px;
}

.shahrvand-contact-close {
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.shahrvand-contact-panel__intro {
    padding: 14px 16px 8px;
    color: var(--shahrvand-contact-text-color);
    font-size: 13px;
    opacity: 0.8;
    text-align: right;
}

.shahrvand-contact-panel__list {
    padding: 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shahrvand-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--shahrvand-contact-text-color);
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.05);
    transition: background 0.25s ease, transform 0.25s ease;
}

.shahrvand-contact-item:hover {
    background: rgba(15, 23, 42, 0.04);
    transform: translateX(2px);
}

.shahrvand-contact-item__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--shahrvand-contact-item-color, #16a34a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.shahrvand-contact-item__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
    flex: 1;
}

.shahrvand-contact-item__title {
    font-size: 12px;
    opacity: 0.75;
}

.shahrvand-contact-item__value {
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 767px) {
    .shahrvand-contact-panel {
        width: min(300px, calc(100vw - 32px));
    }
}

.shahrvand-contact-admin-form {
    margin-top: 24px;
}

.shahrvand-contact-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.shahrvand-contact-panel-card,
.shahrvand-contact-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

.shahrvand-contact-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.shahrvand-contact-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.shahrvand-contact-item-row {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fafafa;
}

.shahrvand-contact-item-row__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f3f4f6;
    padding: 10px 12px;
    font-weight: 700;
}

.shahrvand-contact-item-row__label {
    color: #374151;
}

.shahrvand-contact-item-row__title {
    flex: 1;
    text-align: right;
}

.shahrvand-contact-item-row__body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    padding: 16px;
}

.shahrvand-contact-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shahrvand-contact-field label {
    font-size: 12px;
    color: #374151;
    font-weight: 600;
}

.shahrvand-contact-field input,
.shahrvand-contact-field select {
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

.shahrvand-contact-inline-field {
    justify-content: flex-end;
}

.shahrvand-contact-inline-field input {
    width: 18px;
    height: 18px;
}

/* ── Button Variants ── */
.shahrvand-contact-widget--btn-rounded .shahrvand-contact-button {
    border-radius: calc(var(--shahrvand-contact-button-size) * 0.22);
}

.shahrvand-contact-widget--btn-pill .shahrvand-contact-button {
    border-radius: calc(var(--shahrvand-contact-button-size) * 0.42);
}

/* ── Button Badge ── */
.shahrvand-contact-button__badge {
    position: absolute;
    top: -4px;
    left: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 99px;
    line-height: 1.2;
}

/* ── Button Pulse Animation ── */
@keyframes shahrvand-contact-pulse {
    0%, 100% { box-shadow: var(--shahrvand-contact-shadow); }
    50% { box-shadow: var(--shahrvand-contact-shadow), 0 0 0 8px rgba(22, 163, 74, 0.25); }
}

.shahrvand-contact-widget--btn-pulse .shahrvand-contact-button {
    animation: shahrvand-contact-pulse 2s infinite;
}

.shahrvand-contact-widget--btn-pulse .shahrvand-contact-button:hover {
    animation: none;
}

/* ── Panel Variants ── */
.shahrvand-contact-widget--panel-minimal .shahrvand-contact-panel {
    border: none;
}

.shahrvand-contact-widget--panel-minimal .shahrvand-contact-panel__header {
    background: transparent;
    color: var(--shahrvand-contact-text-color);
}

.shahrvand-contact-widget--panel-minimal .shahrvand-contact-close {
    background: rgba(0, 0, 0, 0.08);
    color: var(--shahrvand-contact-text-color);
}

.shahrvand-contact-widget--panel-bubble .shahrvand-contact-panel {
    border: none;
    box-shadow: var(--shahrvand-contact-shadow);
}

.shahrvand-contact-widget--panel-bubble .shahrvand-contact-panel__header {
    border-radius: var(--shahrvand-contact-radius) var(--shahrvand-contact-radius) 0 0;
}

.shahrvand-contact-widget--panel-card .shahrvand-contact-panel {
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ── Item Variants ── */
.shahrvand-contact-widget--item-minimal .shahrvand-contact-item {
    background: transparent;
    border: none;
    padding: 6px 8px;
}

.shahrvand-contact-widget--item-minimal .shahrvand-contact-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.shahrvand-contact-widget--item-minimal .shahrvand-contact-item__icon {
    background: transparent;
    color: var(--shahrvand-contact-item-color, #16a34a);
}

.shahrvand-contact-widget--item-cards .shahrvand-contact-item {
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--shahrvand-contact-bg-color);
    border-radius: var(--shahrvand-contact-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.shahrvand-contact-widget--item-cards .shahrvand-contact-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* ── Item Divider ── */
.shahrvand-contact-item--divider {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
}

.shahrvand-contact-item--divider:last-child {
    border-bottom: none;
}

/* ── Vertical Layout ── */
.shahrvand-contact-widget--layout-vertical .shahrvand-contact-panel__list {
    align-items: center;
}

.shahrvand-contact-widget--layout-vertical .shahrvand-contact-item {
    flex-direction: column;
    text-align: center;
    justify-content: center;
}

.shahrvand-contact-widget--layout-vertical .shahrvand-contact-item__content {
    align-items: center;
    text-align: center;
}

/* ── Size Presets ── */
.shahrvand-contact-widget--preset-small .shahrvand-contact-button {
    --shahrvand-contact-button-size: 44px;
}

.shahrvand-contact-widget--preset-small .shahrvand-contact-panel {
    --shahrvand-contact-panel-width: 260px;
    font-size: 12px;
}

.shahrvand-contact-widget--preset-small .shahrvand-contact-panel__header {
    padding: 10px 12px;
}

.shahrvand-contact-widget--preset-small .shahrvand-contact-panel__title {
    font-size: 13px;
}

.shahrvand-contact-widget--preset-small .shahrvand-contact-panel__list {
    padding: 0 8px 8px;
    gap: 6px;
}

.shahrvand-contact-widget--preset-small .shahrvand-contact-item {
    padding: 7px 8px;
    gap: 8px;
}

.shahrvand-contact-widget--preset-small .shahrvand-contact-item__icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
}

.shahrvand-contact-widget--preset-small .shahrvand-contact-item__value {
    font-size: 12px;
}

.shahrvand-contact-widget--preset-small .shahrvand-contact-item__title {
    font-size: 10px;
}

.shahrvand-contact-widget--preset-large .shahrvand-contact-button {
    --shahrvand-contact-button-size: 72px;
}

.shahrvand-contact-widget--preset-large .shahrvand-contact-panel {
    --shahrvand-contact-panel-width: 400px;
}

.shahrvand-contact-widget--preset-large .shahrvand-contact-panel__header {
    padding: 16px 18px;
}

.shahrvand-contact-widget--preset-large .shahrvand-contact-panel__title {
    font-size: 17px;
}

.shahrvand-contact-widget--preset-large .shahrvand-contact-panel__list {
    padding: 0 14px 14px;
    gap: 14px;
}

.shahrvand-contact-widget--preset-large .shahrvand-contact-item {
    padding: 14px 14px;
    gap: 14px;
}

.shahrvand-contact-widget--preset-large .shahrvand-contact-item__icon {
    width: 46px;
    height: 46px;
    font-size: 22px;
}

.shahrvand-contact-widget--preset-large .shahrvand-contact-item__value {
    font-size: 16px;
}

.shahrvand-contact-widget--preset-large .shahrvand-contact-item__title {
    font-size: 13px;
}
