/* Device mockups — black frames */

.sms-preview-body {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-align: center;
}

.sms-preview-body .sms-phone-stage {
    text-align: initial;
}

.sms-preview-sender-chip {
    align-items: center;
    align-self: flex-start;
    background: linear-gradient(100deg, #f0f7ff 0%, #f5f3ff 100%);
    border: 1px solid #d7e6f8;
    border-radius: 8px;
    color: #64748b;
    display: inline-flex;
    font-size: .68rem;
    gap: 4px;
    justify-content: flex-start;
    margin: 0 0 6px;
    max-width: 100%;
    padding: 3px 9px;
    width: fit-content;
}

.sms-preview-sender-chip .mud-icon-root {
    color: #3b82f6 !important;
    font-size: .85rem !important;
}

.sms-preview-sender-chip span {
    font-weight: 500;
}

.sms-preview-sender-chip strong {
    color: #1e293b;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .01em;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sms-preview-cancel-btn {
    background: #ff9800 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(255, 152, 0, .35) !important;
    color: #fff !important;
    font-weight: 700 !important;
    min-width: 120px;
    text-transform: none !important;
}

.sms-preview-cancel-btn:hover { background: #f57c00 !important; }
.sms-preview-cancel-btn .mud-icon-root,
.sms-preview-cancel-btn .mud-button-label { color: #fff !important; }

/* سوییچ ملایم هم‌رنگ تم پروژه */
.sms-device-switch {
    --switch-pad: 3px;
    --switch-accent: var(--mud-palette-primary, var(--bs-primary, #685dd8));
    background: linear-gradient(180deg, #f4f6fb 0%, #eef1f8 100%);
    border: 1px solid #e2e6f0;
    border-radius: 8px;
    box-shadow: inset 0 1px 2px rgba(104, 93, 216, .06);
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 auto 8px;
    max-width: 248px;
    padding: var(--switch-pad);
    position: relative;
    width: 100%;
}

.sms-device-switch-thumb {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--switch-accent) 78%, #fff) 0%,
        var(--switch-accent) 100%
    );
    border-radius: 6px;
    box-shadow:
        0 2px 8px color-mix(in srgb, var(--switch-accent) 28%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, .35);
    bottom: var(--switch-pad);
    left: var(--switch-pad);
    position: absolute;
    top: var(--switch-pad);
    transition: left .22s cubic-bezier(.2, .8, .2, 1), right .22s cubic-bezier(.2, .8, .2, 1);
    width: calc(50% - var(--switch-pad));
    z-index: 0;
}

.sms-device-switch.is-ios .sms-device-switch-thumb {
    left: var(--switch-pad);
}

.sms-device-switch.is-android .sms-device-switch-thumb {
    left: calc(50% + 0px);
}

.sms-device-switch-btn {
    align-items: center;
    background: transparent !important;
    border: none !important;
    border-radius: 6px;
    color: #8b93a7 !important;
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: .72rem;
    font-weight: 600;
    gap: 5px;
    justify-content: center;
    line-height: 1;
    min-height: 30px;
    padding: 5px 8px;
    position: relative;
    transition: color .2s ease;
    z-index: 1;
}

.sms-device-switch-btn .mud-icon-root {
    color: inherit !important;
    font-size: .95rem !important;
}

.sms-device-switch-btn:hover:not(.is-active) {
    color: #5b6478 !important;
}

.sms-device-switch-btn.is-active {
    color: #fff !important;
    font-weight: 700;
}

.sms-device-switch-btn.is-active .mud-icon-root {
    color: #fff !important;
}

/* RTL: جای انگشت سوییچ برعکس */
[dir="rtl"] .sms-device-switch.is-ios .sms-device-switch-thumb,
.mud-rtl .sms-device-switch.is-ios .sms-device-switch-thumb {
    left: auto;
    right: var(--switch-pad);
}

[dir="rtl"] .sms-device-switch.is-android .sms-device-switch-thumb,
.mud-rtl .sms-device-switch.is-android .sms-device-switch-thumb {
    left: auto;
    right: calc(50% + 0px);
}

.sms-phone-stage {
    display: flex;
    justify-content: center;
    padding: 0 0 4px;
}

.sms-phone-empty {
    color: #94a3b8;
    font-size: .78rem;
    padding-top: 48px;
    text-align: center;
}

.device-time {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1;
    position: relative;
    z-index: 3;
}

.device-time--ios {
    color: #000;
    font-family: -apple-system, "SF Pro Text", "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: -.02em;
}

.device-time--android {
    color: #202124;
    font-family: "Roboto", "Google Sans", "Segoe UI", system-ui, sans-serif;
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .01em;
}

.device-status-trail {
    align-items: center;
    display: inline-flex;
    flex-direction: row;
    gap: 5px;
    position: relative;
    z-index: 3;
}

.device-status-trail--ios { gap: 6px; }
.device-status-trail--android { gap: 3px; }

.device-ico {
    display: block;
    flex: 0 0 auto;
    height: 12px;
    width: 16px;
}

.device-ico--cellular { width: 18px; height: 12px; }
.device-ico--wifi { width: 15px; height: 11px; }
.device-ico--battery-ios { width: 26px; height: 12px; }
.device-ico--cellular-android { width: 15px; height: 11px; }
.device-ico--wifi-android { width: 14px; height: 11px; }
.device-ico--battery-android { width: 20px; height: 10px; }

.device-net {
    color: #202124;
    font-family: "Roboto", "Google Sans", "Segoe UI", system-ui, sans-serif;
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1;
    margin-right: 1px;
}

.device-battery-pct {
    color: #202124;
    font-family: "Roboto", "Google Sans", "Segoe UI", system-ui, sans-serif;
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    margin-right: 1px;
}

.device-avatar {
    align-items: center;
    background: linear-gradient(160deg, #c7ccd3, #8f97a3);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 700;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.device-avatar--android {
    background: linear-gradient(160deg, #6aa8ff, #1a73e8);
}

.device-chat-date {
    color: #8e8e93;
    font-size: .65rem;
    margin-bottom: 10px;
    text-align: center;
}

/* ===== iPhone ===== */
.device-iphone {
    filter: drop-shadow(0 20px 34px rgba(15, 23, 42, .2));
    position: relative;
    width: 260px;
}

.device-iphone-bezel {
    background: #000;
    border-radius: 30px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .85);
    overflow: hidden;
    padding: 4px;
    position: relative;
}

.device-iphone-btn {
    background: linear-gradient(90deg, #52555c 0%, #2c2e33 55%, #1a1b1e 100%);
    border-radius: 2px;
    box-shadow:
        0 1px 1px rgba(0, 0, 0, .3),
        inset 0 1px 0 rgba(255, 255, 255, .14);
    position: absolute;
    width: 4px;
    z-index: 3;
}

.device-iphone-btn--silent { height: 18px; left: -3px; top: 92px; }
.device-iphone-btn--vol-up { height: 34px; left: -3px; top: 128px; }
.device-iphone-btn--vol-down { height: 34px; left: -3px; top: 170px; }
.device-iphone-btn--power {
    background: linear-gradient(270deg, #52555c 0%, #2c2e33 55%, #1a1b1e 100%);
    height: 56px;
    right: -3px;
    top: 140px;
}

.device-iphone-screen {
    background: #fff;
    border-radius: 26px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
    direction: ltr !important;
    display: flex;
    flex-direction: column;
    height: 500px;
    overflow: hidden;
    position: relative;
    unicode-bidi: isolate;
}

/* iOS: ساعت چپ · Dynamic Island وسط · سیگنال/وای‌فای/باتری راست */
.device-iphone-statusbar {
    color: #000;
    direction: ltr !important;
    flex-shrink: 0;
    height: 44px;
    position: relative;
    unicode-bidi: isolate;
    z-index: 5;
}

.device-iphone-statusbar .device-time--ios {
    left: 26px;
    position: absolute;
    top: 14px;
    z-index: 3;
}

.device-iphone-statusbar .device-status-trail--ios {
    align-items: center;
    display: inline-flex;
    flex-direction: row;
    gap: 5px;
    position: absolute;
    right: 16px;
    top: 15px;
    z-index: 3;
}

.device-time--ios {
    color: #000;
    font-family: -apple-system, "SF Pro Text", "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: -.03em;
    line-height: 1;
}

.device-status-trail--ios .device-ico {
    color: #000;
}

.device-ico--cellular {
    height: 11px;
    width: 16px;
}

.device-ico--wifi {
    height: 11px;
    width: 15px;
}

.device-ico--battery-ios {
    height: 12px;
    width: 25px;
}

/* Dynamic Island — کپسول مشکی ساده مثل آیفون واقعی، لنز فقط سمت راست */
.device-iphone-island {
    background: #000;
    border-radius: 18px;
    box-shadow: 0 0 0 .5px rgba(0, 0, 0, .9);
    height: 27px;
    left: 50%;
    overflow: hidden;
    position: absolute;
    top: 10px;
    transform: translateX(-50%);
    width: 84px;
    z-index: 6;
}

.device-iphone-camera {
    background:
        radial-gradient(circle at 35% 30%, #2a3140 0%, #12151c 42%, #050608 78%, #000 100%);
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .06),
        0 0 0 1px rgba(0, 0, 0, .8);
    height: 10px;
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
}

.device-iphone-camera::after {
    background: radial-gradient(circle, rgba(170, 195, 230, .35) 0%, rgba(170, 195, 230, 0) 70%);
    border-radius: 50%;
    content: "";
    height: 3px;
    left: 2px;
    position: absolute;
    top: 1.5px;
    width: 3px;
}

.device-ios-nav {
    align-items: center;
    background: rgba(248, 248, 248, .94);
    border-bottom: 1px solid #e5e5ea;
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
}

.device-ios-back,
.device-ios-info {
    color: #007aff;
    display: inline-flex;
    width: 54px;
}

.device-ios-back svg,
.device-ios-info svg {
    display: block;
    height: 18px;
    width: 18px;
}

.device-ios-info { justify-content: flex-end; }

.device-ios-contact {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.device-ios-contact strong {
    color: #111;
    font-size: .74rem;
    font-weight: 700;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.device-ios-chat {
    background: #fff;
    flex: 1;
    overflow: auto;
    padding: 12px;
}

.device-ios-bubble {
    background: #34c759;
    border-radius: 18px;
    color: #fff;
    font-size: .8rem;
    line-height: 1.65;
    margin-inline-start: auto;
    max-width: 86%;
    padding: 8px 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.device-ios-composer {
    align-items: center;
    background: #f2f2f7;
    border-top: 1px solid #e5e5ea;
    color: #8e8e93;
    display: flex;
    gap: 8px;
    padding: 8px 10px 2px;
}

.device-ios-plus svg,
.device-ios-mic svg {
    display: block;
    height: 20px;
    width: 18px;
}

.device-ios-input {
    background: #fff;
    border: 1px solid #d1d1d6;
    border-radius: 999px;
    color: #8e8e93;
    flex: 1;
    font-size: .72rem;
    padding: 8px 12px;
}

.device-iphone-home {
    background: #111;
    border-radius: 999px;
    height: 4px;
    margin: 8px auto 9px;
    opacity: .18;
    width: 118px;
}

/* ===== Android ===== */
.device-android {
    filter: drop-shadow(0 20px 34px rgba(15, 23, 42, .2));
    position: relative;
    width: 256px;
}

.device-android-bezel {
    background: linear-gradient(160deg, #2a2a2e 0%, #111113 45%, #000 100%);
    border-radius: 18px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .12),
        inset 0 -1px 0 rgba(0, 0, 0, .55),
        0 0 0 1px rgba(0, 0, 0, .85);
    padding: 4px;
    position: relative;
}

.device-android-btn {
    background: linear-gradient(90deg, #52555c 0%, #2c2e33 55%, #1a1b1e 100%);
    border-radius: 2px;
    box-shadow:
        0 1px 1px rgba(0, 0, 0, .3),
        inset 0 1px 0 rgba(255, 255, 255, .14);
    position: absolute;
    width: 4px;
    z-index: 3;
}

.device-android-btn--vol {
    box-shadow:
        0 40px 0 #2c2e33,
        0 1px 1px rgba(0, 0, 0, .3),
        inset 0 1px 0 rgba(255, 255, 255, .14);
    height: 36px;
    left: -3px;
    top: 120px;
}

.device-android-btn--power {
    background: linear-gradient(270deg, #52555c 0%, #2c2e33 55%, #1a1b1e 100%);
    height: 52px;
    right: -3px;
    top: 140px;
}

.device-android-screen {
    background: #f7f8fa;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05);
    direction: ltr !important;
    display: flex;
    flex-direction: column;
    height: 500px;
    overflow: hidden;
    position: relative;
    unicode-bidi: isolate;
}

/* Android status: time LEFT · punch CENTER · icons RIGHT */
.device-android-statusbar {
    align-items: center;
    direction: ltr !important;
    display: flex;
    flex-shrink: 0;
    height: 34px;
    justify-content: space-between;
    padding: 8px 12px 0;
    position: relative;
    unicode-bidi: isolate;
    z-index: 5;
}

.device-android-punch {
    height: 15px;
    left: 50%;
    position: absolute;
    top: 8px;
    transform: translateX(-50%);
    width: 15px;
    z-index: 6;
}

.device-android-punch-bezel {
    background: #f7f8fa;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .04);
    inset: -2px;
    position: absolute;
}

.device-android-punch-rim {
    background:
        radial-gradient(circle at 50% 40%, #2f3540 0%, #12151b 55%, #000 100%);
    border-radius: 50%;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, .45),
        inset 0 0 2px rgba(0, 0, 0, .9);
    inset: 0;
    position: absolute;
}

.device-android-punch-glass {
    background:
        radial-gradient(circle at 28% 24%, rgba(160, 195, 255, .55) 0%, rgba(70, 100, 150, .18) 30%, transparent 55%),
        radial-gradient(circle at 55% 60%, #1a2434 0%, #070a10 66%, #000 100%);
    border-radius: 50%;
    inset: 2.5px;
    position: absolute;
    z-index: 1;
}

.device-android-punch-iris {
    background: radial-gradient(circle at 40% 35%, #3d5478 0%, #0d1522 58%, #000 100%);
    border-radius: 50%;
    box-shadow: 0 0 1px rgba(170, 200, 255, .4);
    height: 4px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    z-index: 2;
}

.device-android-punch-glint {
    background: radial-gradient(circle, rgba(240, 248, 255, .95) 0%, rgba(240, 248, 255, 0) 70%);
    border-radius: 50%;
    height: 2.5px;
    left: 4px;
    position: absolute;
    top: 3px;
    width: 3px;
    z-index: 3;
}

.device-android-appbar {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e8eaed;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    padding: 8px 12px;
}

.device-android-back,
.device-android-more {
    color: #1a73e8;
    display: inline-flex;
    width: 24px;
}

.device-android-back svg { height: 18px; width: 12px; }
.device-android-more svg { height: 16px; width: 6px; }
.device-android-more { justify-content: flex-end; }

.device-android-contact {
    align-items: center;
    display: flex;
    flex: 1;
    gap: 8px;
    min-width: 0;
}

.device-android-contact strong {
    color: #111;
    display: block;
    font-size: .8rem;
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.device-android-contact small {
    color: #6b7280;
    font-size: .62rem;
}

.device-android-chat {
    background: #f0f2f5;
    flex: 1;
    overflow: auto;
    padding: 12px;
}

.device-android-bubble {
    background: #c9e3fb;
    border-radius: 16px 16px 0px 16px;
    color: #111;
    font-size: .8rem;
    line-height: 1.65;
    margin-inline-start: auto;
    max-width: 86%;
    padding: 8px 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.device-android-composer {
    align-items: center;
    background: #fff;
    border-top: 1px solid #e8eaed;
    color: #1a73e8;
    display: flex;
    gap: 8px;
    padding: 8px 10px;
}

.device-android-attach svg,
.device-android-send svg {
    display: block;
    height: 18px;
    width: 18px;
}

.device-android-input {
    background: #f1f3f4;
    border-radius: 999px;
    color: #6b7280;
    flex: 1;
    font-size: .72rem;
    padding: 8px 12px;
}

.device-android-gesture {
    background: #111;
    border-radius: 999px;
    height: 4px;
    margin: 8px auto 10px;
    opacity: .22;
    width: 110px;
}
