/* RevOps Knowledge Hub - Styles */

:root {
    --primary-orange: #F38020;
    --primary-dark: #D66F1C;
    --primary-light: #FFA656;
    --secondary-blue: #3b82f6;
    --success-green: #10b981;
    --warning-red: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-gray: #f9fafb;
    --border-gray: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-dark);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-dark) 100%);
    padding: 40px;
    border-radius: 16px 16px 0 0;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.logo {
    flex-shrink: 0;
}

.header-text h1 {
    color: white;
    font-size: 32px;
    margin-bottom: 8px;
}

.tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
}

/* Search */
.search-container {
    position: relative;
    max-width: 600px;
}

#searchBar {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#searchBar:focus {
    outline: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
}

.search-result-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-gray);
    cursor: pointer;
    display: flex;
    align-items: start;
    gap: 12px;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: var(--bg-gray);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item.no-results {
    cursor: default;
    color: var(--text-light);
    text-align: center;
}

.result-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.result-content {
    flex: 1;
}

.result-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.result-category {
    font-size: 12px;
    color: var(--primary-orange);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.result-description {
    font-size: 14px;
    color: var(--text-light);
}

/* Stats Section */
.stats-section {
    background: white;
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: var(--bg-gray);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-orange);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    background: white;
    padding: 60px 40px;
}

.hero-section h2 {
    text-align: center;
    font-size: 36px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 50px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.category-card {
    background: var(--bg-gray);
    padding: 32px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-orange);
}

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

.category-card h3 {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.category-card p {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--primary-orange);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}

/* Quick Reference */
.quick-reference {
    background: white;
    padding: 60px 40px;
    border-radius: 0 0 16px 16px;
}

.quick-reference h2 {
    text-align: center;
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 40px;
}

.decision-tree {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.decision-box {
    background: linear-gradient(135deg, var(--bg-gray) 0%, #fff 100%);
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-orange);
    box-shadow: var(--shadow);
}

.decision-box strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 16px;
}

.decision-box p {
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 15px;
}

.highlight {
    color: var(--primary-orange);
    font-weight: 600;
}

.note {
    font-size: 13px;
    color: var(--text-light);
    font-style: italic;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background-color: white;
    margin: 40px auto;
    padding: 0;
    border-radius: 16px;
    max-width: 1200px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-light);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close:hover {
    background: var(--bg-gray);
    color: var(--text-dark);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-dark) 100%);
    padding: 40px;
    color: white;
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 16px;
    opacity: 0.9;
}

/* Items Grid */
.items-grid {
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.item-card {
    background: var(--bg-gray);
    padding: 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-orange);
}

.item-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.item-card h3 {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.priority-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 12px;
    text-transform: uppercase;
}

.priority-p0 {
    background: #fee2e2;
    color: #991b1b;
}

.priority-p1 {
    background: #fef3c7;
    color: #92400e;
}

.priority-p2 {
    background: #dbeafe;
    color: #1e40af;
}

.priority-p3 {
    background: #e0e7ff;
    color: #3730a3;
}

.item-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* Item Detail */
.item-detail-header {
    padding: 40px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: start;
    gap: 24px;
}

.item-detail-icon {
    font-size: 64px;
    flex-shrink: 0;
}

.breadcrumb {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.item-detail-header h2 {
    font-size: 32px;
    margin-bottom: 12px;
}

.item-detail-description {
    font-size: 18px;
    opacity: 0.95;
    line-height: 1.6;
}

#modalContent > div {
    padding: 40px;
}

.details-section,
.examples-section,
.use-cases-section,
.subtypes-section,
.types-section,
.validation-section,
.steps-section,
.process-section,
.comparison-section,
.notes-section,
.critical-section {
    margin-bottom: 40px;
}

.details-section h3,
.examples-section h3,
.use-cases-section h3,
.subtypes-section h3,
.types-section h3,
.validation-section h3,
.steps-section h3,
.process-section h3,
.comparison-section h3,
.notes-section h3,
.critical-section h3 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-gray);
    padding-bottom: 12px;
}

.details-grid {
    display: grid;
    gap: 16px;
}

.detail-item {
    background: var(--bg-gray);
    padding: 16px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-orange);
}

.detail-item strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.detail-item span {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.examples-list,
.use-cases-list,
.types-list,
.validation-list,
.notes-list,
.critical-list {
    list-style: none;
    padding: 0;
}

.examples-list li,
.use-cases-list li,
.types-list li,
.validation-list li,
.notes-list li,
.critical-list li {
    padding: 12px 16px;
    background: var(--bg-gray);
    margin-bottom: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-orange);
    font-size: 15px;
    line-height: 1.6;
}

.validation-list li {
    border-left-color: var(--success-green);
}

.notes-list li,
.critical-list li {
    border-left-color: var(--warning-red);
}

.steps-list,
.process-list {
    padding-left: 24px;
}

.steps-list li,
.process-list li {
    padding: 12px 16px;
    background: var(--bg-gray);
    margin-bottom: 12px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
}

.subtype-card {
    background: var(--bg-gray);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary-orange);
}

.subtype-card h4 {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.subtype-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 8px;
}

.comparison-table {
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-gray);
}

.comparison-table th {
    background: var(--bg-gray);
    font-weight: 600;
    color: var(--text-dark);
}

.comparison-table td {
    color: var(--text-light);
}

.comparison-table tr:hover {
    background: var(--bg-gray);
}

.modal-actions {
    padding: 20px 40px 40px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--bg-gray);
    color: var(--text-dark);
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: white;
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .main-header {
        padding: 24px;
    }

    .header-content {
        flex-direction: column;
        align-items: start;
    }

    .header-text h1 {
        font-size: 24px;
    }

    .stats-section {
        padding: 24px;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .hero-section {
        padding: 40px 24px;
    }

    .hero-section h2 {
        font-size: 28px;
    }

    .category-grid,
    .items-grid,
    .decision-tree {
        grid-template-columns: 1fr;
    }

    .quick-reference {
        padding: 40px 24px;
    }

    .modal-content {
        margin: 20px auto;
    }

    .item-detail-header {
        padding: 24px;
        flex-direction: column;
    }

    #modalContent > div {
        padding: 24px;
    }
}
