/* ============================================
   酒店文件系统打包 - 云端 / 独立服务入口
   ============================================ */

.hp-mode-switcher {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: var(--spacing-lg, 1.5rem);
    padding: 0.5rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg, 1rem);
    background: var(--bg-secondary);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.hp-mode-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    padding: 0.9rem 1rem;
    border: 1px solid transparent;
    border-radius: calc(var(--radius-lg, 1rem) - 0.3rem);
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease,
        transform 160ms ease;
}

.hp-mode-option:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.hp-mode-option:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.35);
    outline-offset: 2px;
}

.hp-mode-option.is-active {
    border-color: rgba(59, 130, 246, 0.42);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(99, 102, 241, 0.08));
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.12);
}

.hp-mode-option-service.is-active {
    border-color: rgba(249, 115, 22, 0.52);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.14), rgba(251, 191, 36, 0.09));
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.13);
}

.hp-mode-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 0.8rem;
    background: var(--bg-tertiary);
    font-size: 1.35rem;
}

.hp-mode-option.is-active .hp-mode-icon {
    background: rgba(59, 130, 246, 0.15);
}

.hp-mode-option-service.is-active .hp-mode-icon {
    background: rgba(249, 115, 22, 0.17);
}

.hp-mode-copy {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 0.18rem;
}

.hp-mode-copy strong {
    font-size: 0.98rem;
    line-height: 1.3;
}

.hp-mode-copy small {
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 0.76rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hp-mode-status {
    flex: 0 0 auto;
    padding: 0.22rem 0.52rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: rgb(59, 130, 246);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hp-mode-status-new {
    background: rgba(249, 115, 22, 0.14);
    color: rgb(234, 88, 12);
}

.hp-mode-panel[hidden] {
    display: none !important;
}

.hp-cloud-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 1.5rem;
}

.hp-service-card {
    overflow: hidden;
    padding: 0;
}

.hp-service-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(251, 191, 36, 0.05));
}

.hp-service-eyebrow {
    margin-bottom: 0.3rem;
    color: rgb(234, 88, 12);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hp-service-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    color: var(--text-primary);
    font-size: 1.15rem;
}

.hp-service-header p {
    margin: 0.35rem 0 0;
    color: var(--text-tertiary);
    font-size: 0.82rem;
}

.hp-service-online {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.72rem;
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.1);
    color: rgb(22, 163, 74);
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

.hp-service-online i {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 50%;
    background: rgb(34, 197, 94);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    animation: hp-service-pulse 2s ease-out infinite;
}

.hp-service-frame-shell {
    position: relative;
    min-height: 720px;
    background: #f5f6f8;
}

#hp-service-frame {
    display: block;
    width: 100%;
    height: clamp(720px, calc(100vh - 220px), 920px);
    border: 0;
    background: #f5f6f8;
}

.hp-service-loading {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #f5f6f8;
    color: #687083;
    font-size: 0.9rem;
}

.hp-service-loading[hidden] {
    display: none;
}

.hp-service-spinner {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid rgba(249, 115, 22, 0.22);
    border-top-color: rgb(249, 115, 22);
    border-radius: 50%;
    animation: hp-service-spin 0.8s linear infinite;
}

@keyframes hp-service-spin {
    to { transform: rotate(360deg); }
}

@keyframes hp-service-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
    70%, 100% { box-shadow: 0 0 0 0.45rem rgba(34, 197, 94, 0); }
}

@media (max-width: 900px) {
    .hp-cloud-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .hp-mode-switcher {
        grid-template-columns: 1fr;
    }

    .hp-mode-option {
        padding: 0.8rem;
    }

    .hp-service-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 1rem;
    }

    .hp-service-frame-shell {
        min-height: 820px;
    }

    #hp-service-frame {
        height: 820px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hp-mode-option,
    .hp-service-online i,
    .hp-service-spinner {
        animation: none;
        transition: none;
    }
}
