/* SwiftUI Preview Styles */

/* Main container */
.swift-ui-preview {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #FFFFFF;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: #000000;
    overflow: hidden;
    border-radius: 30px;
}

/* Status bar */
.swift-ui-status-bar {
    height: 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 0 24px;
    background-color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
    position: relative;
}

.swift-ui-status-bar .time {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    font-weight: 600;
    color: #000000;
}

.status-icons {
    display: flex;
    gap: 3px;
    align-items: center;
    margin-left: auto;
}

.status-icons .signal,
.status-icons .wifi {
    width: 14px;
    height: 9px;
    background-color: #000000;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.status-icons .signal {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 11'%3E%3Cpath fill='%23000' d='M15 8c.6 0 1 .4 1 1v1c0 .6-.4 1-1 1s-1-.4-1-1V9c0-.6.4-1 1-1zm-3-2c.6 0 1 .4 1 1v3c0 .6-.4 1-1 1s-1-.4-1-1V7c0-.6.4-1 1-1zm-3-2c.6 0 1 .4 1 1v5c0 .6-.4 1-1 1s-1-.4-1-1V5c0-.6.4-1 1-1zM6 2c.6 0 1 .4 1 1v7c0 .6-.4 1-1 1s-1-.4-1-1V3c0-.6.4-1 1-1z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 11'%3E%3Cpath fill='%23000' d='M15 8c.6 0 1 .4 1 1v1c0 .6-.4 1-1 1s-1-.4-1-1V9c0-.6.4-1 1-1zm-3-2c.6 0 1 .4 1 1v3c0 .6-.4 1-1 1s-1-.4-1-1V7c0-.6.4-1 1-1zm-3-2c.6 0 1 .4 1 1v5c0 .6-.4 1-1 1s-1-.4-1-1V5c0-.6.4-1 1-1zM6 2c.6 0 1 .4 1 1v7c0 .6-.4 1-1 1s-1-.4-1-1V3c0-.6.4-1 1-1z'/%3E%3C/svg%3E");
}

.status-icons .wifi {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 11'%3E%3Cpath fill='%23000' d='M7.5 10c.4 0 .8-.3.8-.7s-.4-.8-.8-.8-.8.4-.8.8.4.7.8.7zm1.6-2.3c.3.3.3.8 0 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2c-.6-.6-1.6-.6-2.2 0-.3.3-.8.3-1.1 0s-.3-.8 0-1.1c1.2-1.2 3.1-1.2 4.3 0zm2.1-2.1c.3.3.3.8 0 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2c-1.5-1.5-3.9-1.5-5.4 0-.3.3-.8.3-1.1 0s-.3-.8 0-1.1c2.1-2.1 5.5-2.1 7.5 0zm2.1-2.1c.3.3.3.8 0 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2c-2.4-2.4-6.3-2.4-8.7 0-.3.3-.8.3-1.1 0s-.3-.8 0-1.1c3-3 7.9-3 10.8 0z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 11'%3E%3Cpath fill='%23000' d='M7.5 10c.4 0 .8-.3.8-.7s-.4-.8-.8-.8-.8.4-.8.8.4.7.8.7zm1.6-2.3c.3.3.3.8 0 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2c-.6-.6-1.6-.6-2.2 0-.3.3-.8.3-1.1 0s-.3-.8 0-1.1c1.2-1.2 3.1-1.2 4.3 0zm2.1-2.1c.3.3.3.8 0 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2c-1.5-1.5-3.9-1.5-5.4 0-.3.3-.8.3-1.1 0s-.3-.8 0-1.1c2.1-2.1 5.5-2.1 7.5 0zm2.1-2.1c.3.3.3.8 0 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2c-2.4-2.4-6.3-2.4-8.7 0-.3.3-.8.3-1.1 0s-.3-.8 0-1.1c3-3 7.9-3 10.8 0z'/%3E%3C/svg%3E");
}

.status-icons .battery {
    width: 18px;
    height: 9px;
    border: 1px solid #000000;
    border-radius: 2px;
    position: relative;
    box-sizing: border-box;
    margin-left: 2px;
}

.status-icons .battery::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 12px;
    height: 5px;
    background-color: #000000;
    border-radius: 1px;
}

.status-icons .battery::after {
    content: '';
    position: absolute;
    top: 3px;
    right: -2px;
    width: 1.5px;
    height: 1.5px;
    background-color: #000000;
    border-radius: 0 1px 1px 0;
}

/* Content container */
.swift-ui-container {
    flex: 1;
    overflow: auto;
    padding: 16px;
    position: relative;
}

/* Error view */
.swift-ui-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 24px;
    text-align: center;
    color: #FF3B30;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-message {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.error-tip {
    font-size: 14px;
    color: #8E8E93;
}

/* Component styles */
.swift-text {
    line-height: 1.3;
}

.swift-button {
    user-select: none;
    transition: opacity 0.2s;
}

.swift-button:hover {
    opacity: 0.9;
}

.swift-button-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.image-placeholder {
    font-size: 14px;
    color: #8E8E93;
    text-align: center;
}

.swift-list {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.swift-navigation-view {
    background-color: #F2F2F7;
}

.swift-tab-button {
    color: #8E8E93;
    transition: color 0.2s;
    cursor: pointer;
}

.swift-tab-button.active {
    color: #007AFF;
}

.swift-tab-button:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.swift-tab-content {
    background-color: #FFFFFF;
}

.toggle-label {
    font-size: 16px;
}

/* Default component styles */
.unknown-element, .unsupported-component {
    padding: 8px;
    background-color: rgba(255, 59, 48, 0.1);
    border: 1px dashed #FF3B30;
    border-radius: 4px;
    color: #FF3B30;
    font-family: monospace;
    font-size: 12px;
    margin: 4px 0;
}

.unsupported-component::before {
    content: 'Unsupported: ';
    font-weight: bold;
}

/* Interactive components */
.swift-text-field:hover {
    border-color: #007AFF;
}

.toggle-switch {
    cursor: pointer;
}

/* Animation classes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.swift-ui-container {
    animation: fadeIn 0.3s ease-in-out;
}

/* Media queries for different device sizes */
@media (max-width: 320px) {
    .swift-ui-preview {
        border-radius: 20px;
    }
    
    .swift-ui-status-bar {
        height: 32px;
        font-size: 12px;
        padding: 0 16px 0 20px;
    }
    
    .swift-ui-status-bar .time {
        left: 20px;
        font-size: 12px;
    }
    
    .status-icons {
        gap: 2px;
    }
    
    .status-icons .signal,
    .status-icons .wifi {
        width: 12px;
        height: 7px;
    }
    
    .status-icons .battery {
        width: 14px;
        height: 7px;
    }
    
    .status-icons .battery::before {
        width: 10px;
        height: 3px;
    }
    
    .status-icons .battery::after {
        width: 1px;
        height: 1px;
        top: 2.5px;
        right: -1.5px;
    }
    
    .swift-ui-container {
        padding: 12px;
    }
}

/* Placeholder styles */
.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
    text-align: center;
    color: #8E8E93;
}

.preview-app-name {
    font-size: 24px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 12px;
}

.preview-app-message {
    font-size: 16px;
    line-height: 1.4;
    color: #8E8E93;
    max-width: 280px;
} 