/* 
 * 8alpha Global Styles
 * Common styles used across all templates
 * Includes: typography, cards, buttons, utilities, and layout components
 */

/* ============================
   Typography & Fonts
   ============================ */

/* Base font size reduction - 2px smaller than default (16px -> 14px) */
html {
    font-size: 14px;
}

body {
    line-height: 1.8;
}

* {
    font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 300;
}

p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

/* Ultra Light for headings and emphasis */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.ultra-light {
    font-family: "Helvetica Neue Ultra Light", "HelveticaNeue-UltraLight", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 200;
}

/* Light weight for body text */
body, p, div, span, a, li, td, th,
.light {
    font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 300;
}

/* Bold elements should use regular Helvetica Neue */
strong, b, .font-weight-bold, .fw-bold {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 500;
}

/* ============================
   Common Card Styles
   ============================ */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-default {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-default:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.card-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #adb5bd;
}

.card-header h1, .card-header h2, .card-header h3,
.card-header h4, .card-header h5, .card-header h6 {
    margin-top: 0;
    margin-bottom: 0;
}

/* ============================
   Gradient Backgrounds
   ============================ */
.gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-blue {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.gradient-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 4rem;
    border-radius: 10px;
    margin-bottom: 3rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.gradient-header h1 {
    margin: 0 0 1.5rem 0;
    color: white;
    font-size: 2.2em;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gradient-header p {
    margin: 0;
    color: rgba(255,255,255,0.9);
    font-size: 1.1em;
    line-height: 1.8;
}

/* ============================
   Status & State Indicators
   ============================ */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
}

.status-completed, .status-success {
    background: #d4edda;
    color: #155724;
}

.status-failed, .status-error {
    background: #f8d7da;
    color: #721c24;
}

.status-running, .status-processing {
    background: #d1ecf1;
    color: #0c5460;
}

.status-pending, .status-warning {
    background: #fff3cd;
    color: #856404;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ============================
   Grid Layouts
   ============================ */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.grid-auto-fill {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

/* ============================
   Common Transitions
   ============================ */
.transition-default {
    transition: all 0.2s ease;
}

.transition-slow {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.15s ease;
}

/* ============================
   Hover Effects
   ============================ */
.hover-lift:hover {
    transform: translateY(-2px);
}

.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* ============================
   Common Animations
   ============================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ============================
   Utility Classes
   ============================ */
/* Common utilities for inline style replacement */

/* Display utilities */
.clickable {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.nowrap {
    white-space: nowrap;
}

.preline {
    white-space: pre-line;
}

/* Sizing utilities */
.search-input-width {
    width: 260px;
}

.w-18rem {
    width: 18rem;
}

.th-col-30 {
    width: 30%;
}

.badge-min-80 {
    min-width: 80px;
}

.badge-min-90 {
    min-width: 90px;
}

.badge-min-100 {
    min-width: 100px;
}

/* Font size utilities */
.icon-size-sm {
    font-size: 0.7rem;
}

.font-xs {
    font-size: 0.55rem;
}

.font-sm {
    font-size: 0.7rem;
}

.font-md {
    font-size: 0.75rem;
}

.font-lg {
    font-size: 0.8rem;
}

.font-85 {
    font-size: 0.85rem;
}

.font-90 {
    font-size: 0.9rem;
}

/* Padding/spacing utilities */
.p-xs {
    padding: 0.1rem 0.3rem;
}

.mb-xs {
    margin-bottom: 0.3rem;
}

/* Border utilities */
.no-border {
    border: none !important;
}

.no-box-shadow {
    box-shadow: none !important;
}

.border-dark-2 {
    border: 2px solid #000000 !important;
}

/* Background utilities */
.bg-white {
    background-color: #ffffff !important;
}

.bg-light-gray {
    background-color: #f8f9fa !important;
}

/* Height utilities */
.h-20px {
    height: 20px;
}

.h-30px {
    height: 30px;
}

.h-4px {
    height: 4px;
}

.h-8px {
    height: 8px;
}

.h-25px {
    height: 25px;
}

/* Width utilities */
.w-30px {
    width: 30px;
}

.w-40px {
    width: 40px;
}

.w-50px {
    width: 50px;
}

.w-60px {
    width: 60px;
}

/* Line height utilities */
.lh-11 {
    line-height: 1.1;
}

.lh-12 {
    line-height: 1.2;
}

/* Max height with scroll */
.scrollable-260 {
    max-height: 260px;
    overflow: auto;
}

.scrollable-400 {
    max-height: 400px;
    overflow-y: auto;
}

.scrollable-70vh {
    max-height: 70vh;
    overflow-y: auto;
}

/* Logo in heading */
.logo-inline {
    height: 1.2em;
    vertical-align: middle;
    margin: 0 0.2em;
}

/* Fixed positioning utilities */
.fixed-top-right {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}

.sticky-top-20 {
    top: 20px;
}

/* Navbar utilities */
.navbar-padding {
    padding: 1rem 0;
}

.container-padding-4rem {
    padding: 0 4rem;
}

.body-padding-top {
    padding-top: 80px;
}

/* ============================
   Links & Buttons
   ============================ */
.link-clean {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.link-clean:hover {
    text-decoration: none;
    color: inherit;
}

/* Bootstrap button enhancements */
.btn {
    transition: all 0.2s ease;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #545b62;
    border-color: #4e555b;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.btn-secondary:disabled,
.btn-secondary.disabled {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #6c757d;
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-dark {
    background-color: #212529;
    border-color: #212529;
}

.btn-dark:hover:not(:disabled) {
    background-color: #000000;
    border-color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-dark:disabled,
.btn-dark.disabled {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #6c757d;
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-outline-dark:hover:not(:disabled) {
    background-color: #212529;
    border-color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.btn-outline-dark:disabled,
.btn-outline-dark.disabled {
    border-color: #dee2e6;
    color: #6c757d;
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-gradient-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

/* ============================
   Component Classes  
   ============================ */

/* Modal customizations */
.modal-content {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.modal-header,
.modal-footer {
    padding: 1rem 1.25rem;
    border-color: #e9ecef;
}

.modal-body {
    padding: 1.25rem;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header .modal-title,
.modal-header h1,
.modal-header h2,
.modal-header h3,
.modal-header h4,
.modal-header h5,
.modal-header h6 {
    margin: 0;
    line-height: 1.3;
}

.modal-header .btn-close {
    margin: 0;
    padding: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-header .btn-close:hover {
    opacity: 1;
    transform: scale(1.03);
}

.modal-header.bg-dark {
    background-color: #212529 !important;
}

.modal-footer {
    background-color: #f8f9fa;
    gap: 0.5rem;
}

.modal-header.modal-header-centered {
    position: relative;
    justify-content: center;
}

.modal-header.modal-header-centered .modal-title {
    width: 100%;
    /* text-align: center; */
    /* padding: 0 1.25rem; */
}

.modal-header.modal-header-centered .btn-close {
    position: absolute;
    top: 50%;
    right: var(--bs-modal-header-padding-x, 1.25rem);
    transform: translateY(-50%);
}

.modal-header.modal-header-centered .btn-close:hover {
    transform: translateY(-50%) scale(1.03);
}

/* Workflow components */
.workflow-step {
    margin-bottom: 0.3rem;
}

.workflow-step-badge {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
}

.step-title {
    font-size: 0.85rem;
    margin-bottom: 0;
    line-height: 1.2;
}

.step-badge-sm {
    font-size: 0.55rem;
    padding: 0.1rem 0.3rem;
}

.workflow-card-sm {
    font-size: 0.75rem;
}

.workflow-icon-md {
    font-size: 0.9rem;
}

.workflow-title-sm {
    font-size: 0.7rem;
    line-height: 1.1;
}

/* Alert variations */
.alert-white {
    background-color: #ffffff;
}

.alert-white-bordered {
    background-color: #ffffff;
    border: 2px solid #000000;
}

.alert-sm-text {
    font-size: 0.9rem;
}

/* Progress bars */
.progress-sm {
    height: 4px;
}

.progress-md {
    height: 8px;
}

.progress-lg {
    height: 20px;
}

.progress-xl {
    height: 25px;
}

/* Accordion customizations */
.accordion-btn-borderless {
    border: none;
}

/* Pre/code blocks */
.pre-scrollable {
    max-height: 400px;
    overflow-y: auto;
}

/* Text color utilities */
.text-muted-sm {
    font-size: 0.7rem;
    color: #6c757d;
}

.color-495057 {
    color: #495057;
}

.color-adb5bd {
    color: #adb5bd;
}

/* ============================
   Metrics & Stats
   ============================ */
.metric-value {
    font-size: 2rem;
    font-weight: bold;
    color: #000;
}

.metric-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ============================
   Navigation Elements
   ============================ */
.nav-pills-custom .nav-link {
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #2d3748;
}

.nav-pills-custom .nav-link:hover {
    background: #f7fafc;
    transform: translateY(-1px);
}

.nav-pills-custom .nav-link.active {
    background: #3182ce;
    color: white;
}

/* ============================
   Container Overrides (Bootstrap)
   ============================ */
.container,
.container-fluid {
    padding-left: 4rem;
    padding-right: 4rem;
}

.main-content {
    padding-left: 4rem;
    padding-right: 4rem;
}

@media (max-width: 768px) {
    .container,
    .container-fluid,
    .main-content {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ============================
   Content Sections
   ============================ */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 4rem;
}

.content-section {
    background: white;
    border-radius: 8px;
    padding: 3rem 4.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ============================
   Table Enhancements
   ============================ */
.table-hover-effect tbody tr {
    transition: background-color 0.2s;
}

.table-hover-effect tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
}

/* ============================
   Navbar Utilities
   ============================ */
.navbar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.navbar-logo {
    max-height: 40px;
    width: auto;
}

/* ============================
   Footer
   ============================ */
.site-footer {
    background-color: #f8f9fa;
    padding: 1.5rem 0;
    margin-top: auto;
}

/* ============================
   Utility Classes
   ============================ */
.text-gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.shadow-medium {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.shadow-strong {
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.rounded-lg {
    border-radius: 10px;
}

.rounded-md {
    border-radius: 8px;
}

.rounded-sm {
    border-radius: 6px;
}

/* ============================
   Responsive Utilities
   ============================ */
@media (max-width: 768px) {
    .grid-auto-fit,
    .grid-auto-fill {
        grid-template-columns: 1fr;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .gradient-header h1 {
        font-size: 1.8em;
    }
    
    .content-wrapper {
        padding: 2rem 2.5rem;
    }
    
    .content-section {
        padding: 2.5rem 2rem;
    }
    
    .gradient-header {
        padding: 2.5rem 2rem;
    }
}
