/* ============================================
   FPT Web Push - WebPush Page Styles
   Hero Banner, Filter Bar, NS Table, Stepper,
   Prompt Table, Advanced Settings, Code Block
   ============================================ */

/* ============================================
   Hero Banner
   ============================================ */
.hero-banner {
    background: #01297A url('../images/sdk_banner_bg_detail.png') no-repeat center right;
    background-size: cover;
    width: 100%;
    height: 160px;
    padding: 32px 40px;
    color: #fff;
    position: relative;
    overflow: hidden;
    border-radius: 0px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sdk-hub-detail .hero-banner {
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
}

.hero-banner-simple {
    background: linear-gradient(135deg, #01297A 0%, #034EA2 100%);
    padding: 36px 40px;
    color: #fff;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -60px;
    right: 100px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-banner-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 350px;
    height: 100%;
    background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.06) 60%, rgba(255, 255, 255, 0.12) 100%);
    pointer-events: none;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.hero-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.hero-search {
    position: relative;
    max-width: 280px;
    z-index: 1;
}

.hero-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    color: #333;
    outline: none;
    transition: all 0.3s;
}

.hero-search input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(3, 78, 162, 0.15);
}

.hero-search input::placeholder {
    color: #999;
}

.hero-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
}

/* ============================================
   Create Namespace Section
   ============================================ */
.create-ns-section {
    padding: 24px 32px;
}

.create-ns-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #181D27;
    margin-bottom: 16px;
}

.create-ns-btn {
    width: 80px;
    height: 80px;
    background-color: rgba(1, 41, 122, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.create-ns-btn:hover {
    background-color: rgba(1, 41, 122, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.create-ns-btn-inner {
    width: 44px;
    height: 44px;
    background: linear-gradient(45deg, #01297A, #034EA2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

/* ============================================
   Filter Bar
   ============================================ */
.ns-management-section {
    padding: 0 32px 32px;
}

.ns-management-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ns-management-title {
    font-size: 16px;
    font-weight: 700;
    color: #181D27;
    white-space: nowrap;
}

.ns-count-badge {
    background: #EEEEEE;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
    color: #535862;
    font-weight: 500;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

.filter-dropdown {
    padding: 7px 32px 7px 14px;
    border: 1px solid #D0D5DD;
    border-radius: 6px;
    font-size: 13px;
    color: #414651;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 140px;
    transition: border-color 0.2s;
}

.filter-dropdown:hover {
    border-color: var(--accent-color);
}

.filter-date-range {
    padding: 7px 14px;
    border: 1px solid #D0D5DD;
    border-radius: 6px;
    font-size: 13px;
    color: #414651;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-date-range:hover {
    border-color: var(--accent-color);
}

.filter-date-range i {
    color: #999;
}

/* ============================================
   Namespace Table
   ============================================ */
.ns-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05);
    border: 1px solid var(--border-color);
}

.ns-table thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    color: #717680;
    background: #EEEEEE;
    border-bottom: 1px solid var(--border-medium);
    white-space: nowrap;
}

.ns-table tbody tr {
    border-bottom: 1px solid #E9EAEB;
    cursor: pointer;
    transition: background 0.15s;
}

.ns-table tbody tr:hover {
    background-color: #f0f6ff;
}

.ns-table tbody tr:last-child {
    border-bottom: none;
}

.ns-table td {
    padding: 16px;
    font-size: 14px;
    color: #414651;
    vertical-align: middle;
}

.ns-name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ns-name {
    font-weight: 600;
    font-size: 14px;
    color: #181D27;
}

.ns-id {
    font-size: 12px;
    color: #999;
}

.ns-creator-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ns-creator-avatar {
    width: 32px;
    height: 32px;
    background: rgba(1, 41, 122, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #01297A;
    flex-shrink: 0;
}

.ns-creator-name {
    font-size: 14px;
    color: #414651;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    gap: 4px;
}

.status-badge-success {
    background: #e6f9e6;
    color: #2e7d32;
}

.status-badge-error {
    background: #ffebee;
    color: #c62828;
}

/* Provider icon */
.provider-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 18px;
}

.provider-icon-error {
    color: var(--error-color);
}

.provider-icon-link {
    color: #999;
}

/* Scroll indicator */
.ns-table-scroll-indicator {
    text-align: right;
    padding: 8px 16px;
    font-size: 12px;
    color: #bbb;
}

/* ============================================
   Namespace Detail - Stepper Layout
   ============================================ */
.ns-detail-layout {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.ns-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.ns-detail-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ns-detail-back-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #333;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.ns-detail-back-btn:hover {
    color: var(--accent-color);
}

.ns-detail-title {
    font-size: 18px;
    font-weight: 700;
    color: #181D27;
}

.ns-detail-title-input {
    font-size: 18px;
    font-weight: 700;
    border: none;
    background: transparent;
    color: #181D27;
    outline: none;
    width: 300px;
    font-family: inherit;
}

.ns-detail-title-input:focus {
    border-bottom: 2px solid var(--accent-color);
}

/* Stepper Sidebar */
.ns-stepper {
    width: 260px;
    background: #fff;
    border-right: 1px solid var(--border-color);
    padding: 32px 24px;
    flex-shrink: 0;
}

.ns-stepper-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    cursor: pointer;
    position: relative;
}

.ns-stepper-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 52px;
    width: 2px;
    height: calc(100% - 36px);
    background: #E9EAEB;
}

.ns-stepper-item.active:not(:last-child)::after {
    background: var(--primary-color);
}

.ns-stepper-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #D0D5DD;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
    background: #fff;
    position: relative;
    z-index: 1;
}

.ns-stepper-item.active .ns-stepper-indicator {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.ns-stepper-item.completed .ns-stepper-indicator {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.ns-stepper-indicator i {
    font-size: 12px;
}

.ns-stepper-indicator .stepper-dot {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.ns-stepper-content {
    flex: 1;
    padding-top: 4px;
}

.ns-stepper-title {
    font-size: 14px;
    font-weight: 600;
    color: #414651;
    margin-bottom: 4px;
}

.ns-stepper-desc {
    font-size: 12px;
    color: #717680;
    line-height: 1.4;
}

.ns-stepper-item.active .ns-stepper-title {
    color: var(--primary-color);
}

.ns-stepper-link {
    color: var(--accent-color);
    text-decoration: underline;
    font-size: 12px;
    cursor: pointer;
}

/* Stepper Content Area */
.ns-stepper-main {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background: var(--bg-color);
}

/* ============================================
   Prompt Table (Namespace Detail)
   ============================================ */
.prompt-table {
    width: 100%;
    border-collapse: collapse;
}

.prompt-table thead th {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #717680;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.prompt-table tbody td {
    padding: 14px 16px;
    font-size: 14px;
    color: #414651;
    border-bottom: 1px solid #E9EAEB;
    vertical-align: middle;
}

.prompt-table tbody tr:last-child td {
    border-bottom: none;
}

.prompt-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt-icon-circle {
    width: 32px;
    height: 32px;
    background: linear-gradient(45deg, #01297A, #034EA2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.prompt-name {
    font-weight: 500;
}

.prompt-action-text {
    color: var(--accent-color);
    cursor: pointer;
    font-size: 13px;
}

.prompt-action-text:hover {
    text-decoration: underline;
}

/* ============================================
   Advanced Settings
   ============================================ */
.advanced-section {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.advanced-section .card-title {
    font-size: 16px;
    margin-bottom: 24px;
}

.advanced-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    min-height: 40px;
}

.advanced-row-label {
    font-weight: 500;
    color: #414651;
    font-size: 14px;
    min-width: 200px;
}

.advanced-row-content {
    flex: 1;
}

.advanced-row-desc {
    font-size: 13px;
    color: #717680;
}

/* ============================================
   Code Block (Results Page)
   ============================================ */
.code-block-dark {
    background: #1e1e2e;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #cdd6f4;
    margin: 16px 0;
    border: 1px solid #313244;
}

.code-block-dark .code-tag {
    color: #89b4fa;
}

.code-block-dark .code-attr {
    color: #a6e3a1;
}

.code-block-dark .code-string {
    color: #f9e2af;
}

.code-block-dark .code-keyword {
    color: #cba6f7;
}

.code-block-dark .code-comment {
    color: #6c7086;
    font-style: italic;
}

.code-block-dark .code-var {
    color: #f5c2e7;
}

.code-block-dark .code-func {
    color: #89dceb;
}

/* Result section buttons */
.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.result-actions .btn {
    font-size: 13px;
    height: 34px;
}

/* Service Worker download button */
.sw-download-btn {
    width: 100%;
    padding: 12px;
    background: #F8F9FC;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #535862;
    font-size: 14px;
}

.sw-download-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: #f0f7ff;
}