/* Mobile question preview — loaded globally (Portal.styles.css not referenced in _Host) */

.mobile-preview-panel {
    position: sticky;
    top: 1rem;
    text-align: center;
    align-self: flex-start;
    max-height: calc(100vh - 5.5rem);
}

.mobile-preview-label {
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.mobile-device-outlier {
    display: inline-block;
    padding: 0;
    width: 100%;
    max-width: 360px;
    max-height: calc(100vh - 7rem);
    background: transparent;
    box-shadow: none;
}

.mobile-device {
    position: relative;
    --phone-h: min(560px, calc(100vh - 11rem));
    height: var(--phone-h);
    width: min(320px, calc(var(--phone-h) * 9 / 19.5), 100%);
    max-width: 320px;
    margin: 0 auto;
    min-height: 0;
    border-radius: 52px;
    padding: 12px;
    box-sizing: border-box;
    background: linear-gradient(145deg, #2d2d2d 0%, #1a1a1a 40%, #0f0f0f 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 0 0 2px #0a0a0a,
        0 20px 40px rgba(0, 0, 0, 0.35),
        0 8px 16px rgba(0, 0, 0, 0.2);
}

.mobile-device-side {
    position: absolute;
    background: linear-gradient(90deg, #3a3a3a, #1f1f1f);
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.mobile-device-side--power {
    right: -4px;
    top: 28%;
    width: 4px;
    height: 64px;
    border-radius: 0 4px 4px 0;
}

.mobile-device-side--vol-up {
    left: -4px;
    top: 22%;
    width: 4px;
    height: 36px;
    border-radius: 4px 0 0 4px;
}

.mobile-device-side--vol-down {
    left: -4px;
    top: 32%;
    width: 4px;
    height: 36px;
    border-radius: 4px 0 0 4px;
}

.mobile-device-bezel {
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 42px;
    overflow: hidden;
    background: #000;
}

.mobile-device-notch {
    flex-shrink: 0;
    align-self: center;
    width: 108px;
    height: 26px;
    margin: 10px auto 8px;
    background: #0a0a0a;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
    z-index: 1;
}

.mobile-device-speaker {
    width: 34px;
    height: 5px;
    background: #1e1e1e;
    border-radius: 2px;
}

.mobile-device-camera {
    width: 10px;
    height: 10px;
    background: radial-gradient(circle at 30% 30%, #3d4f6a, #0d1117 70%);
    border-radius: 50%;
    box-shadow: 0 0 0 1px #252525;
}

.mobile-device-screen {
    flex: 1;
    min-height: 0;
    margin: 0 4px;
    background: #fff;
    border-radius: 4px 4px 0 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    border: 1px solid #111;
}

.mobile-device-home-bar {
    flex-shrink: 0;
    height: 18px;
    margin: 0 5px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 0 0 4px 4px;
    border: 1px solid #111;
    border-top: none;
}

.mobile-device-home-bar::after {
    content: "";
    width: 90px;
    height: 5px;
    background: #1a1a1a;
    border-radius: 4px;
    opacity: 0.35;
}

.mobile-device-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 6px 8px;
    font-size: 0.85em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-shrink: 0;
    overflow: visible;
}

.mobile-device-header-title {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.mobile-device-header-title svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.mobile-device-header-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-device-header-save {
    flex: 0 0 auto;
    display: inline-block;
    background-color: #28a745;
    color: #fff;
    font-size: 0.7em;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 3px;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.mobile-device-body {
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 12px 14px;
    font-size: 0.92em;
    flex: 1;
    min-height: 0;
}

.mobile-preview-empty {
    color: #6c757d;
    text-align: center;
    margin: 24px 8px;
    font-size: 0.9em;
}

.mobile-question-block {
    margin-bottom: 4px;
}

.mobile-question-child {
    margin-left: 10px;
    padding-left: 8px;
    border-left: 2px solid #dee2e6;
}

.mobile-question-editing {
    background: #fff8e1;
    border-radius: 4px;
    padding: 4px;
}

.mobile-question-title {
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}

.mobile-required {
    color: #dc3545;
    font-size: 0.65em;
    margin-left: 4px;
}

.mobile-question-divider {
    margin: 8px 0;
    border-color: #e9ecef;
}

.mobile-field {
    background-color: whitesmoke !important;
    font-size: 0.95em;
}

.mobile-preview-placeholder {
    background: #fff3cd;
    border: 1px dashed #ffc107;
    color: #856404;
    font-size: 0.85em;
    padding: 6px 8px;
    border-radius: 4px;
    font-style: italic;
}

.mobile-choice label {
    display: block;
    margin-bottom: 4px;
    font-weight: normal;
}

.mobile-action-btn {
    width: 100%;
    padding: 8px !important;
}

.mobile-label p {
    margin: 0 0 4px;
}

.mobile-coords {
    padding: 8px;
    text-align: center;
    color: #495057;
}

.mobile-listdata-linked,
.mobile-listdata-empty {
    font-size: 0.8em;
    color: #6c757d;
    font-style: italic;
    margin-top: 4px;
}

.mobile-listdata-caption {
    font-size: 0.85em;
    color: #495057;
    margin-bottom: 4px;
    word-break: break-word;
}

.mobile-listdata-media .mobile-listdata-caption {
    text-align: center;
}
