/* Share Page Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.share-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.share-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(66, 133, 244, 0.05) 0%, transparent 70%);
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.app-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin: 0 auto 24px;
    position: relative;
    z-index: 1;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
}

.app-icon.placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 48px;
}

.app-name {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.app-description {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.platform-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.platform-badge.ios {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.platform-badge.android {
    background: rgba(76, 175, 80, 0.1);
    color: #2E7D32;
}

.platform-badge.web {
    background: rgba(86, 101, 252, 0.1);
    color: #5665fc;
}

.launch-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.launch-btn {
    padding: 16px 24px;
    border-radius: 12px;
    border: none;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    position: relative;
    overflow: hidden;
}

.launch-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.launch-btn:active::before {
    width: 300px;
    height: 300px;
}

.launch-btn i {
    font-size: 24px;
}

.ios-btn {
    background: linear-gradient(135deg, #000000 0%, #434343 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.ios-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.android-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.android-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.4);
}

.web-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4) !important;
}

.android-download-btn {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.3);
}

.android-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 152, 0, 0.4);
}

.qr-code-btn {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.qr-code-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.built-with {
    position: relative;
    margin-top: 20px;
    font-size: 28px;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.built-with:hover {
    color: #6b7280;
}

.built-with-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    body {
        padding: 10px;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .share-container {
        padding: 25px 20px;
        margin: 0;
        max-height: calc(100vh - 20px);
        max-height: calc(-webkit-fill-available - 20px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .app-icon {
        width: 80px;
        height: 80px;
        border-radius: 20px;
        margin-bottom: 16px;
    }

    .app-icon.placeholder {
        font-size: 36px;
    }

    .app-name {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .app-description {
        font-size: 14px;
        margin-bottom: 16px;
        line-height: 1.4;
    }

    .platform-badges {
        margin-bottom: 16px;
        gap: 8px;
    }

    .platform-badge {
        padding: 4px 10px;
        font-size: 12px;
    }

    .launch-buttons {
        gap: 10px;
        margin-bottom: 24px;
    }

    .launch-btn {
        padding: 14px 18px;
        font-size: 15px;
        min-height: 48px;
    }

    .launch-btn i {
        font-size: 18px;
    }

    .built-with {
        font-size: 22px;
        padding: 12px 24px;
    }

    .built-with-logo {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* Emulator Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: white;
    margin: 2vh auto;
    padding: 15px;
    border-radius: 10px;
    width: 90%;
    max-width: 450px;
    max-height: 96vh;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.emulator-header {
    display: block;
    text-align: center;
}

#emulator-title {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

#emulator-app-name {
    display: none;
}

#emulator-frame {
    border: none;
    display: block;
    margin: 0 auto;
    width: 378px;
    height: 800px;
    max-height: calc(96vh - 80px);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    background: #f8f9fa;
    flex-shrink: 0;
}

.emulator-controls {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.emulator-control-btn {
    background: #007AFF;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.emulator-control-btn:hover {
    background: #0056b3;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.emulator-control-btn:active {
    transform: scale(0.95);
}

.emulator-control-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.emulator-control-btn i {
    font-size: 20px;
}

/* Special styling for screenshot button to make it clearer */
#screenshot-btn {
    position: relative;
}

#screenshot-btn::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #007AFF;
}

/* Tablet responsive */
@media (max-width: 768px) {
    .modal {
        overflow: hidden;
    }

    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 2vh auto;
        padding: 15px;
        max-height: 96vh;
        overflow: hidden;
        box-sizing: border-box;
    }

    #emulator-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    #emulator-frame {
        width: 100%;
        height: 70vh;
        max-height: calc(96vh - 100px);
        max-width: 100%;
        display: block;
    }

    .emulator-controls {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }

    .emulator-control-btn {
        width: 44px;
        height: 44px;
    }

    .emulator-control-btn i {
        font-size: 18px;
    }
}

/* Mobile responsive */
@media (max-width: 480px) {

    html,
    body {
        height: 100%;
        height: -webkit-fill-available;
        overflow: hidden !important;
        position: fixed;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Prevent scrolling on background content when modal is open */
    body:has(.modal[style*="display: block"]) {
        overflow: hidden !important;
    }

    body:has(.modal[style*="display: block"]) .share-container {
        overflow: hidden !important;
    }

    .modal {
        overflow: hidden !important;
        position: fixed;
        touch-action: none;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        padding: 0;
    }

    .modal-content {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        margin: 0;
        border-radius: 0;
        max-width: 100%;
        padding: 0;
        position: relative;
        overflow: hidden !important;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }

    /* Close button positioning for share.html (without emulator-header) */
    .modal-content>.close {
        position: absolute;
        top: 10px;
        top: max(10px, env(safe-area-inset-top));
        right: 15px;
        z-index: 1002;
        background: rgba(255, 255, 255, 0.95);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        color: #333;
        font-size: 28px;
        line-height: 1;
        float: none;
    }

    .emulator-header {
        background: white;
        padding: 12px 15px;
        padding-top: max(12px, env(safe-area-inset-top));
        border-bottom: 1px solid #eee;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
        min-height: 50px;
        box-sizing: border-box;
        width: 100%;
        overflow: hidden;
    }

    #emulator-title {
        font-size: 16px;
        margin: 0;
        flex: 1;
        text-align: left;
        line-height: 1.3;
    }

    #emulator-app-name {
        display: block;
        font-size: 13px;
        color: #666;
        font-family: 'Inter', sans-serif;
    }

    #emulator-app-name:before {
        content: "•";
        margin: 0 8px;
        color: #999;
    }

    .close {
        font-size: 32px;
        line-height: 1;
        min-width: 32px;
        text-align: center;
    }

    #emulator-frame {
        width: 100%;
        height: 0;
        flex: 1 1 auto;
        border-radius: 0;
        box-shadow: none;
        position: relative;
        display: block;
        overflow: hidden;
        min-height: 0;
        max-height: 100%;
        box-sizing: border-box;
    }

    .emulator-controls {
        position: absolute;
        bottom: calc(80px + env(safe-area-inset-bottom));
        right: 15px;
        z-index: 1001;
    }

    /* Prevent any scrollbar on modal - Webkit browsers */
    .modal::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .modal-content::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    #emulator-frame::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    /* Prevent any scrollbar on modal - Firefox */
    .modal {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .modal-content {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    #emulator-frame {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
}

/* Custom Notification Styles */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.notification {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    transform: translateX(400px);
    opacity: 0;
    animation: slideIn 0.3s ease forwards;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.notification.success::before {
    background: #10b981;
}

.notification.error::before {
    background: #ef4444;
}

.notification.info::before {
    background: #3b82f6;
}

.notification.warning::before {
    background: #f59e0b;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.notification.success .notification-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.notification.error .notification-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.notification.info .notification-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.notification.warning .notification-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 2px;
}

.notification-message {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

.notification-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: all 0.2s;
    flex-shrink: 0;
}

.notification-close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

.notification.hiding {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Progress bar for auto-dismiss */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.2;
    transition: width linear;
}

.notification.success .notification-progress {
    background: #10b981;
}

.notification.error .notification-progress {
    background: #ef4444;
}

.notification.info .notification-progress {
    background: #3b82f6;
}

.notification.warning .notification-progress {
    background: #f59e0b;
}

/* Mobile responsive for notifications */
@media (max-width: 480px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .notification {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

/* QR Code Modal Styles */
.qr-modal-content {
    max-width: 400px;
    text-align: center;
    position: relative;
}

.qr-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 28px;
    font-weight: 300;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.qr-close-btn:hover {
    color: #6b7280;
}

.qr-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 24px;
    text-align: center;
    padding-right: 30px;
    padding-left: 30px;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 24px auto;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    width: fit-content;
}

.qr-code-container canvas,
.qr-code-container img {
    display: block !important;
    max-width: 256px;
    max-height: 256px;
}

/* Ensure only one QR code is visible */
.qr-code-container>*:not(:first-child) {
    display: none !important;
}

.qr-instructions {
    font-size: 14px;
    color: #6b7280;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qr-instructions i {
    color: #4CAF50;
    font-size: 18px;
}

.qr-url-container {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    align-items: center;
}

.qr-url-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #4b5563;
    background: #f9fafb;
    font-family: 'SF Mono', Monaco, monospace;
}

.copy-url-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.copy-url-btn:hover {
    opacity: 1;
}

/* Mobile responsive for QR modal */
@media (max-width: 480px) {
    .qr-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .qr-title {
        font-size: 20px;
    }

    .qr-code-container {
        padding: 15px;
    }

    .qr-url-container {
        flex-direction: column;
        gap: 12px;
    }

    .copy-url-btn {
        width: 100%;
        padding: 12px;
    }
}


@media (max-width: 480px) {
    .mobileview-appetizemodel {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 10000;
    }

    .mobileview-appetizemaincontainer {
        width: 100%;
        height: 100%;
        background: white;
        padding: 10px;
        display: flex;
        flex-direction: column;
    }

    /* Top container - 90% height */
    .mobileview-emulator-top-container {
        flex: 0 0 90%;
        display: flex;
        flex-direction: column;
    }

    /* Header row - device selector (10%), iframe (80%), close button (10%) */
    .mobileview-emulator-header-row {
        display: flex;
        align-items: start;
        width: 100%;
        height: 100%;
    }

    .mobileview-appetizeselectdevicecontainer {
        flex: 0 0 10%;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        border: 2px solid #5665fc;
        background: white;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        aspect-ratio: 1;
        max-width: 50px;
    }

    .mobileview-appetizeselectdevice {
        width: 24px;
        height: 24px;
    }

    .mobileview-emulatordevice {
        flex: 0 0 80%;
        border: none;
        border-radius: 40px;
        height: 100%;
    }

    .login-popup-close {
        flex: 0 0 10%;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 99999;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: #333;
        max-width: 50px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        position: absolute;
        top: 16px;
        right: 16px;
    }

    .emulator-action-btn {
        width: 100%;
        padding: 16px;
        border-radius: 12px;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        font-size: 16px;
        font-weight: 600;
        transition: all 0.2s;
        font-family: 'Inter', sans-serif;
    }

    .emulator-action-btn.secondary {
        background: white;
        color: #5665fc;
        border: 2px solid #e5e7eb;
    }

    .apply-changes-button {
        display: none !important;
    }

    /* Action buttons container - 10% height */
    .mobileview-emulatoractionbuttoncontainer {
        flex: 0 0 10%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 10px 0;
    }

    .mobileview-emulatoractionbuttoncontainer>* {
        flex: 1;
        text-align: center;
    }

    .mobileview-emulatoractionbuttoncontainer button {
        border: 2px solid #5665fc !important;
    }

    .mobileview-emulatoractionbuttoncontainer button.apply-changes-button {
        border: none !important;
        padding: 16px 20px !important;
        gap: 5px !important;
    }

    .mobileview-emulatoractionbuttoncontainer button.apply-changes-button img {
        fill: white;
        filter: brightness(0) invert(1);
    }


    .device-selector-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 100000;
    }

    .device-selector-modal {
        background: white;
        border-radius: 24px;
        padding: 32px;
        max-width: 600px;
        width: 75%;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }

    .device-selector-content {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .device-selector-columns {
        display: flex;
        gap: 24px;
    }

    .device-selector-column {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .device-selector-label {
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 1px;
        color: #333;
        text-transform: uppercase;
    }

    .device-selector-dropdown {
        position: relative;
    }

    .device-selector-button {
        width: 100%;
        padding: 20px 24px;
        background: white;
        border: 2px solid #e0e0e0;
        border-radius: 16px;
        font-size: 18px;
        font-weight: 500;
        color: #333;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: all 0.2s ease;
        text-align: left;
    }

    .device-selector-button:hover {
        border-color: #5665fc;
        background: #f8f9ff;
    }

    .device-selector-button i {
        font-size: 16px;
        color: #666;
        transition: transform 0.2s ease;
    }

    .device-selector-button:focus {
        outline: none;
        border-color: #5665fc;
        box-shadow: 0 0 0 3px rgba(86, 101, 252, 0.1);
    }

    .device-selector-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        background: white;
        border: 2px solid #e0e0e0;
        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        z-index: 10;
        max-height: 300px;
        overflow-y: auto;
    }

    .device-selector-option {
        padding: 16px 24px;
        font-size: 16px;
        color: #333;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .device-selector-option:hover {
        background: #f8f9ff;
    }

    .device-selector-option.selected {
        background: #f0f2ff;
        color: #5665fc;
        font-weight: 600;
    }

    .device-selector-option:first-child {
        border-radius: 14px 14px 0 0;
    }

    .device-selector-option:last-child {
        border-radius: 0 0 14px 14px;
    }

    .device-selector-actions {
        display: flex;
        gap: 12px;
        margin-top: 8px;
    }

    .device-selector-cancel,
    .device-selector-apply {
        flex: 1;
        padding: 16px 24px;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        border: none;
    }

    .device-selector-cancel {
        background: #f0f0f0;
        color: #666;
    }

    .device-selector-cancel:hover {
        background: #e0e0e0;
    }

    .device-selector-apply {
        background: #5665fc;
        color: white;
    }

    .device-selector-apply:hover {
        background: #4555ec;
        box-shadow: 0 4px 12px rgba(86, 101, 252, 0.3);
    }

    /* Scrollbar styling for dropdown menu */
    .device-selector-menu::-webkit-scrollbar {
        width: 8px;
    }

    .device-selector-menu::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 10px;
    }

    .device-selector-menu::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 10px;
    }

    .device-selector-menu::-webkit-scrollbar-thumb:hover {
        background: #999;
    }

    .device-selector-modal {
        padding: 24px;
        width: 75% !important;
    }

    .device-selector-columns {
        flex-direction: column;
        gap: 16px;
    }

    .device-selector-button {
        padding: 16px 20px;
        font-size: 16px;
    }

    .device-selector-label {
        font-size: 12px;
    }

    .device-selector-option {
        padding: 14px 20px;
        font-size: 15px;
    }



    /* Change Request Modal Overlay */
    .change-request-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 10000;
        padding: 16px;
    }

    .change-request-modal {
        background: white;
        border-radius: 24px;
        padding: 24px;
        width: 90%;
        max-width: 500px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        display: flex;
        flex-direction: column;
        gap: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Header */
    .change-request-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
    }

    .change-request-title {
        font-size: 18px;
        font-weight: 400;
        color: #1a1a1a;
        margin: 0;
        line-height: 1.3;
        flex: 1;
    }

    .change-request-close {
        background: transparent;
        border: none;
        cursor: pointer;
        font-size: 18px;
        color: #999;
        padding: 4px;
        display: flex;
        align-items: start;
        justify-content: center;
        transition: color 0.2s ease;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .change-request-close:hover {
        color: #333;
    }

    .change-request-close:active {
        color: #000;
    }

    /* Textarea Container */
    .change-request-textarea-container {
        position: relative;
    }

    .change-request-textarea {
        width: 100%;
        padding: 18px;
        padding-right: 56px;
        padding-bottom: 56px;
        border: 2px solid #e5e5e5;
        border-radius: 16px;
        font-size: 16px;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        color: #333;
        background: #f8f9fa;
        resize: vertical;
        min-height: 180px;
        transition: all 0.2s ease;
        box-sizing: border-box;
    }

    .change-request-textarea::placeholder {
        color: #bbb;
    }

    .change-request-textarea:focus {
        outline: none;
        border-color: #6b7bff;
        background: white;
        box-shadow: 0 0 0 3px rgba(107, 123, 255, 0.1);
    }

    .change-request-attachment {
        position: absolute;
        bottom: 16px;
        right: 16px;
        background: transparent;
        border: none;
        cursor: pointer;
        font-size: 20px;
        color: #bbb;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        width: 36px;
        height: 36px;
        border-radius: 50%;
    }

    .change-request-attachment:hover {
        color: #6b7bff;
        background: #f0f2ff;
    }

    .change-request-attachment:active {
        color: #5665fc;
        background: #e0e5ff;
    }

    /* Generate Button */
    .change-request-generate {
        width: 100%;
        padding: 16px;
        background: linear-gradient(135deg, #6b7bff 0%, #8b5cf6 100%);
        color: white;
        border: none;
        border-radius: 14px;
        font-size: 17px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 20px rgba(107, 123, 255, 0.3);
    }

    .change-request-generate:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(107, 123, 255, 0.4);
    }

    .change-request-generate:active {
        transform: translateY(0);
        box-shadow: 0 2px 15px rgba(107, 123, 255, 0.3);
    }

    /* Scrollbar for modal content if needed */
    .change-request-modal::-webkit-scrollbar {
        width: 6px;
    }

    .change-request-modal::-webkit-scrollbar-track {
        background: transparent;
    }

    .change-request-modal::-webkit-scrollbar-thumb {
        background: #ddd;
        border-radius: 10px;
    }

    .change-request-modal::-webkit-scrollbar-thumb:hover {
        background: #ccc;
    }


    .attachment-count-container {
        margin: 0 !important;
        padding: 6px 6px !important;
        font-size: 0.75rem !important;
        height: 30px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between;
        margin-top: 8px;
        margin-bottom: 8px;
        background-color: rgb(240, 249, 255);
        color: rgb(30, 64, 175);
        gap: 8px;
        border-width: 1px;
        border-style: solid;
        border-color: rgb(191, 219, 254);
        border-radius: 8px;
    }

    .attachment-count-text {
        font-size: 14px;
    }



    .clear-attachments-btn:hover {
        color: #6b7280 !important;
    }





}