/* ============================================================
   integrations.css — Shell Stylesheet
   CCH SureTax Developer Portal · Integrations Section
   Layout: Fixed header + fixed sidebar + scrollable content pane.
   The overview (tile gallery) is inline; detail pages load in an
   iframe that fills the content pane.
   ============================================================ */

/* ---------- Variables ---------- */
:root {
    --wk-blue: #007AC3;
    --wk-blue-medium: #409BD2;
    --wk-blue-light: #A6D0EA;
    --wk-blue-ultra-light: #E8F4FB;
    --wk-green: #5A8A15;
    --wk-green-medium: #7BAA3C;
    --wk-teal: #00A3A1;
    --wk-teal-medium: #33B8B6;
    --wk-orange: #FF6B35;
    --wk-red: #E5202E;
    --card-base-color: #3F51B5;
    --card-border-color: rgba(0, 0, 0, 0.3);
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --header-height: 56px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ---------- Base ---------- */
html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 11pt;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
}

a { color: var(--wk-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 100;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.header-logo:hover { text-decoration: none; }

.logo-mark {
    background: var(--wk-blue);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
}

.logo-img {
    height: 28px;
    width: auto;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.primary-nav a {
    color: rgba(255,255,255,0.8);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.primary-nav a:hover { color: white; background: rgba(255,255,255,0.1); text-decoration: none; }
.primary-nav a.active { color: white; background: rgba(255,255,255,0.15); }

.nav-divider {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    margin: 0 6px;
}

.help-link {
    color: rgba(255,255,255,0.7);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.help-link:hover { color: white; background: rgba(255,255,255,0.1); text-decoration: none; }
.help-link svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- Page Container ---------- */
.page-container {
    display: flex;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
}

/* ---------- Sidebar ---------- */
.sidebar-nav {
    width: 260px;
    min-width: 260px;
    padding: 24px 16px;
    border-right: 1px solid var(--gray-200);
    background: white;
    overflow-y: auto;
}

.sidebar-section { margin-bottom: 20px; }
.sidebar-nav ul { list-style: none; margin: 0; padding: 0; }
.sidebar-nav li { margin: 0; padding: 0; }

.sidebar-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-400);
    margin-bottom: 8px;
    padding: 0 12px;
}

.sidebar-nav a {
    display: block;
    padding: 6px 12px;
    color: var(--gray-600);
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.15s;
    text-decoration: none;
    cursor: pointer;
}

.sidebar-nav a:hover { color: var(--wk-blue); background: var(--wk-blue-ultra-light); text-decoration: none; }
.sidebar-nav a.active { color: var(--wk-blue); background: var(--wk-blue-ultra-light); font-weight: 600; }

/* ---------- Content Pane ---------- */
.content-pane {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

/* ---------- Overview Content ---------- */
.overview-content {
    padding: 32px 48px;
    max-width: 1100px;
}

.overview-content.hidden { display: none; }

/* ---------- Detail Iframe ---------- */
.detail-frame {
    display: none;
    width: 100%;
    height: 100%;
    border: none;
}

.detail-frame.visible { display: block; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 24px;
}

.breadcrumb a { color: var(--gray-500); text-decoration: none; }
.breadcrumb a:hover { color: var(--wk-blue); text-decoration: underline; }
.breadcrumb .sep { color: var(--gray-300); }

/* ---------- Typography ---------- */
h1 {
    color: var(--wk-blue);
    font-size: 28pt;
    font-weight: 700;
    margin-bottom: 12px;
}

.lead {
    font-size: 13pt;
    color: var(--gray-600);
    margin-bottom: 32px;
    line-height: 1.7;
}

h2 {
    font-size: 18pt;
    color: var(--gray-800);
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 16px;
    padding-top: 20px;
    border-top: 2px solid var(--wk-blue);
}

h2:first-of-type { margin-top: 0; border-top: none; padding-top: 0; }

p { margin-bottom: 16px; }
ol, ul { margin-left: 24px; margin-bottom: 16px; }
li { margin-bottom: 6px; }

/* ---------- Tile Grid ---------- */
.tile-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 32px;
}

/* ---------- Tiles ---------- */
.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 210px;
    min-height: 260px;
    border: 1px solid #6B6B6B;
    border-radius: 10px;
    padding: 16px 14px;
    background-color: white;
    background-image: linear-gradient(to bottom right, white, #FEF8F8);
    cursor: pointer;
    text-decoration: none;
    color: var(--gray-800);
    transition: border-color 0.2s, border-width 0.15s, box-shadow 0.2s;
}

.tile:hover {
    border-width: 2px;
    box-shadow: 5px 5px 10px rgba(0,0,0,0.25);
    text-decoration: none;
}

/* Category-specific tile hover */
.tile:hover:has(.tile-icon-box.erp) {
    border-color: var(--wk-blue-medium);
    box-shadow: 0 0 0 1px #3F51B5, 5px 5px 10px rgba(64, 155, 210, 0.25);
}

.tile:hover:has(.tile-icon-box.ecom) {
    border-color: var(--wk-green-medium);
    box-shadow: 0 0 0 1px var(--wk-green), 5px 5px 10px rgba(123, 170, 60, 0.25);
}

.tile:hover:has(.tile-icon-box.pattern) {
    border-color: #ffb347;
    box-shadow: 0 0 0 1px var(--wk-orange), 5px 5px 10px rgba(255, 179, 71, 0.25);
}

.tile:hover:has(.tile-icon-box.other) {
    border-color: var(--wk-teal-medium);
    box-shadow: 0 0 0 1px var(--wk-teal), 5px 5px 10px rgba(51, 184, 182, 0.25);
}

/* Category-specific button hover */
.tile:hover .tile-icon-box.erp ~ .tile-btn {
    background: linear-gradient(135deg, #3F51B5, var(--wk-blue-medium));
    color: white;
    border-color: #3F51B5;
}

.tile:hover .tile-icon-box.ecom ~ .tile-btn {
    background: linear-gradient(135deg, var(--wk-green), var(--wk-green-medium));
    color: white;
    border-color: var(--wk-green);
}

.tile:hover .tile-icon-box.pattern ~ .tile-btn {
    background: linear-gradient(135deg, var(--wk-orange), #ffb347);
    color: white;
    border-color: var(--wk-orange);
}

.tile:hover .tile-icon-box.other ~ .tile-btn {
    background: linear-gradient(135deg, var(--wk-teal), var(--wk-teal-medium));
    color: white;
    border-color: var(--wk-teal);
}

.tile-title {
    text-align: center;
    font-size: 11pt;
    font-weight: 700;
    color: var(--gray-900);
    padding: 4px 4px 8px;
    line-height: 1.3;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Tile Icon Box ---------- */
.tile-icon-box {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.tile-icon-box svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.tile-icon-box.erp { background: linear-gradient(135deg, #3F51B5, var(--wk-blue-medium)); }
.tile-icon-box.ecom { background: linear-gradient(135deg, var(--wk-green), var(--wk-green-medium)); }
.tile-icon-box.pattern { background: linear-gradient(135deg, var(--wk-orange), #ffb347); }
.tile-icon-box.other { background: linear-gradient(135deg, var(--wk-teal), var(--wk-teal-medium)); }

.tile-desc {
    text-align: center;
    font-size: 8.5pt;
    color: var(--gray-600);
    line-height: 1.5;
    padding: 0 2px;
    flex: 1;
}

/* ---------- Tile Button ---------- */
.tile-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 18px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 9pt;
    font-weight: 600;
    color: var(--gray-600);
    background: white;
    transition: all 0.2s;
}

/* ---------- Callout ---------- */
.callout {
    border-left: 4px solid var(--wk-blue);
    background: var(--wk-blue-ultra-light);
    padding: 20px 24px;
    border-radius: 0 8px 8px 0;
    margin-top: 32px;
}

.callout h4 {
    font-size: 11pt;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--gray-800);
}

.callout p { margin-bottom: 0; font-size: 10pt; color: var(--gray-600); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .sidebar-nav { display: none; }
    .overview-content { padding: 24px 20px; }
    .tile-grid { justify-content: center; }
    .tile { width: 100%; max-width: 280px; }
    .primary-nav { display: none; }
}
