
main.fi-main {
    height: 300%;
}

#preview-root {
    height: 100vh;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #f2f2f2;
    padding: 25px;
}

#preview-root * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#preview-root html, body {
    min-width: 1200px;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#preview-root #stripoEditorContainer {
    height: calc(100% - 103px); /* 65px header + 38px disclaimer */
    background-color: #f5f5f7;
}

#preview-root #externalSystemContainer {
    border-radius: var(--radius-xl);
    background: #f5f5f5;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e1e1e1;
    height: 65px;
    margin-bottom: 15px;
}

#preview-root #externalSystemContainer > div:first-child {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

#preview-root .control-button {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #4a4a4a;
    cursor: pointer;
    transition: all 0.2s ease;
}

#preview-root .control-button:hover {
    background: #f8f8f8;
    border-color: #c5c5c5;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

#preview-root .control-button:active {
    transform: translateY(0);
    box-shadow: none;
}

#preview-root .control-button.active {
    background: #347de2;
    border-color: #347de2;
    color: white;
}

#preview-root .control-button.active:hover {
    background: #347de2;
    border-color: #347de2;
}

#preview-root .btn-group {
    display: flex;
    gap: 1px;
    background: #e1e1e1;
    border-radius: 8px;
    padding: 1px;
}

#preview-root .btn-group button {
    background: #ffffff;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #6b6b6b;
    cursor: pointer;
    transition: all 0.2s ease;
}

#preview-root .btn-group button:first-child {
    border-radius: 7px 0 0 7px;
}

#preview-root .btn-group button:last-child {
    border-radius: 0 7px 7px 0;
}

#preview-root .btn-group button:hover {
    background: #f8f8f8;
}

#preview-root .btn-group button.active {
    background: #347de2;
    color: white;
}

#preview-root .btn-group button.active:hover {
    background: #347de2;
}

#preview-root .avatar-preview {
    width: 34px;
    height: 34px;
    border-radius: 15px;
    background-size: cover;
    display: inline-block;
    margin-left: 5px;
}

/* Notifications styles */
#preview-root .notification-zone {
    position: fixed;
    width: 700px;
    max-width: 90%;
    z-index: 99999;
    right: 30px;
    bottom: 80px;
}

#preview-root .alert-success {
    color: #0f5d0f;
    background: #e6f7e6;
    padding: 16px 20px;
    border-left: 4px solid #28a745;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#preview-root .alert-info {
    color: #004085;
    background: #e7f3ff;
    padding: 16px 20px;
    border-left: 4px solid #007bff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#deprecated-preview {
    display: none;
}

/* Phone Preview Layout */
#phonePreviewContainer {
    display: none;
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#phonePreviewWrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

#phoneFrame {
    position: relative;
    background: black;
    border-radius: 2.5rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    width: 430px;
    height: 860px;
    border: 6px solid black;
    overflow: hidden;
}

#phoneNotch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: black;
    width: 128px;
    height: 24px;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    z-index: 10;
}

#phoneScreen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #111;
    border-radius: 2.3rem;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Gmail-style phone UI */
#phoneScreen #gmailHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-bottom: 1px solid #ddd;
    padding: 30px 10px 12px;
}

#phoneScreen .gmail-header-left .gmail-back {
    font-size: 20px;
    cursor: pointer;
    color: #444;
}

#phoneScreen .gmail-header-right {
    display: flex;
    gap: 14px;
}

#phoneScreen .gmail-icon {
    font-size: 18px;
    cursor: pointer;
    color: #555;
    vertical-align: middle;
    width: 1.2em;
    height: 1.2em;
}

/* Always-on dark Gmail preview styles */
#phoneScreen #phoneScreen {
    background: #111;
    color: white;
}

#phoneScreen #gmailHeader, #phoneScreen #gmailSubjectBar, #phoneScreen #gmailSenderBar, #phoneScreen #gmailEmailContent, #phoneScreen #gmailBottomBar, #phoneScreen #gmailBottomNav {
    background: #1a1a1a;
    border-color: #333;
}

#phoneScreen .gmail-subject, #phoneScreen .gmail-sender-name, #phoneScreen .gmail-sender-to, #phoneScreen .gmail-icon, #phoneScreen .gmail-nav-item {
    color: white;
}

#phoneScreen .gmail-unsubscribe {
    background: none;
    color: white;
    border-color: #444;
}

#phoneScreen #gmailSubjectBar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 10px 0px;
}

#phoneScreen .gmail-subject {
    font-size: 17px;
    font-weight: 600;
    color: white;
}

#phoneScreen .gmail-star {
    font-size: 22px;
    color: #ccc;
    cursor: pointer;
}

#phoneScreen #gmailSenderBar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 10px;
}

#phoneScreen .gmail-sender-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

#phoneScreen .gmail-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid white;
}

#phoneScreen .gmail-sender-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

#phoneScreen .gmail-sender-name {
    font-size: 15px;
    font-weight: 600;
}

#phoneScreen .gmail-sender-to {
    font-size: 13px;
    color: #666;
}

#phoneScreen .gmail-sender-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

#phoneScreen .gmail-unsubscribe {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    color: lightblue;
}

#phoneScreen #gmailEmailContent {
    flex: 1 1 auto;
    overflow-y: auto;
    position: relative;
    padding: 0;
    background: #1a1a1a;
}

#phoneScreen {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

#phoneScreen #gmailBottomBar {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #1a1a1a;
    border-top: 1px solid #333;
    flex-shrink: 0;
}

#phoneScreen .gmail-action-btn {
    flex: 1 1 50%;
    padding: 10px 0;
    font-size: 14px;
    border: 1px solid #444;
    border-radius: 6px;
    background: transparent;
    color: white;
    cursor: pointer;
    text-align: center;
    padding-block: 6px !important;
}

#phoneScreen #gmailBottomNav {
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    background: #1a1a1a;
    border-top: 1px solid #333;
    flex-shrink: 0;
}

#phoneScreen .gmail-nav-item {
    font-size: 13px;
    color: #444;
    cursor: pointer;
}

/* ---------------------------
   DESKTOP PREVIEW CONTAINER
---------------------------- */
#desktopPreviewContainer {
    display: none;
    height: 100%;
    width: 100%;
    padding: 32px;
    justify-content: center;
    align-items: center;
}

#desktopPreviewWrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* ---------------------------
   MACBOOK FRAME
---------------------------- */
#desktopFrame {
    position: relative;
    width: 1180px;
    height: 760px;
    background: #111;
    border-radius: 12px;
    border: 12px solid #1a1a1a;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 4px 16px rgba(0, 0, 0, 0.35);
}

#desktopScreen {
    position: absolute;
    inset: 0;
    display: flex;
    overflow: hidden;
    background: #0f0f10;
}

/* ---------------------------
   ROOT LAYOUT
---------------------------- */
.gmail-desktop-root {
    display: flex;
    width: 100%;
    height: 100%;
}

/* ---------------------------
   SIDEBAR
---------------------------- */
.gmail-sidebar {
    width: 260px;
    padding: 18px 14px !important;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gmail-sidebar .compose-btn {
    background: white;
    color: #111;
    border-radius: 32px;
    padding: 12px 20px !important;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px !important;
    width: 80%;
}

.gmail-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px !important;
    border-radius: 16px;
    font-size: 14px;
    color: #e2e8f0;
    cursor: pointer;
}

.gmail-sidebar .nav-item.active {
    background: #505252;
    color: white;
    font-weight: 600;
}

.gmail-sidebar .nav-item:hover {
    background: #202327;
}

/* ---------------------------
   TOP BAR
---------------------------- */
.gmail-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
}

.gmail-topbar {
    height: 58px;
    padding: 0 20px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1a1a1a;
}

.gmail-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gmail-topbar-logo {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #ef4444;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.gmail-topbar-title {
    font-size: 18px;
    font-weight: 500;
}

/* Search bar */
.gmail-search-wrapper {
    flex: 1;
    max-width: 500px;
    margin: 0 24px 0 -278px !important;
}

.gmail-search {
    width: 100%;
    background: #505252;
    border-radius: 20px;
    border: 1px solid #2b2f33;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px 10px !important;
}

.gmail-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
}

/* ---------------------------
   RIGHT SIDE USER BUTTONS
---------------------------- */
.gmail-topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.gmail-avatar-desktop {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid white;
}

/* ---------------------------
   TWO-COLUMN LAYOUT
---------------------------- */
.gmail-main-inner {
    display: flex;
    min-height: 0;
    overflow: hidden;
    height: 100%;
}

/* ---------------------------
   THREAD LIST
---------------------------- */
.gmail-thread-list {
    width: 340px;
    flex-shrink: 0;
    overflow-y: auto;
}

/* ---------------------------
   EMAIL VIEW PANEL
---------------------------- */
.gmail-message-view {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    margin: 5px !important;
    border-radius: 16px;
    overflow: hidden;
}

/* ================================
GLOBAL ICON FIX
Force consistent icon sizing
================================ */
.gmail-icon,
#desktopFrame .gmail-icon,
#desktopScreen .gmail-icon,
.gmail-desktop-root .gmail-icon,
#phoneScreen .gmail-icon {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;

    /* Prevent SVGs from scaling by parent font size */
    flex-shrink: 0;
    stroke-width: 2;
}

/* OPTIONAL: Remove inherited font-size scaling */
.gmail-icon svg {
    width: 18px !important;
    height: 18px !important;
}

.gmail-desktop-root .gmail-message-body {
    flex: 1 1 auto;
    position: relative;
    overflow: hidden;
    background: #020617;
}

.gmail-desktop-root #gmailDesktopIframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

.gmail-desktop-root .gmail-message-toolbar {
    padding: 6px 16px !important;
    border-bottom: 1px solid #1f2937;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #aaaaaa;
    background: #2d2d2d;
}

.gmail-message-toolbar-left,
.gmail-message-toolbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gmail-toolbar-btn,
.gmail-toolbar-icon-btn,
.gmail-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    color: #1f1f1f;
}

.gmail-message-toolbar .gmail-icon {
    color: #e5e7eb;
}

.gmail-toolbar-btn:hover,
.gmail-toolbar-icon-btn:hover,
.gmail-icon-btn:hover {
    background: #111827;
}

.gmail-toolbar-divider {
    width: 1px;
    height: 20px;
    background: #374151;
    margin: 0 6px;
}

.gmail-toolbar-count {
    margin: 0 6px;
    font-size: 12px;
    color: #9ca3af;
}

.gmail-message-header {
    background: white;
    padding: 10px 20px 8px 20px !important;
    padding-bottom: 10px !important;
}

.gmail-message-subject-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.gmail-message-subject {
    font-size: 18px;
    font-weight: 500;
    color: #1f1f1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: 40px !important;
}

.gmail-message-sender-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #9ca3af;
}

.gmail-message-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gmail-message-meta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gmail-message-meta-text > span {
    color: #1f1f1f;
}

.gmail-message-to {
    font-size: 12px;
    color: #1f1f1f;
}

.gmail-message-meta-right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #1f1f1f;
}

.gmail-message-time {
    white-space: nowrap;
}

#desktopScreen #gmailEmailContent {
    height: 100%;
    overflow-x: hidden;
}
