/*
* PCI Design Identity System
* Consolidated tokens and utilities for cross-project usage.
*/

:root {
    /* Brand Colors */
    --pci-primary: #0d6efd;
    --pci-primary-dark: #0b5ed7;
    --pci-secondary: #6c757d;
    --pci-slate-900: #0f172a;
    --pci-slate-800: #1e293b;
    --pci-slate-500: #64748b;
    --pci-slate-50: #f8fafc;

    /* Gradients */
    --pci-gradient-primary: linear-gradient(135deg, #0d6efd 0%, #004fb0 100%);
    --pci-gradient-gold: linear-gradient(135deg, #c5a059 0%, #a68541 100%);

    /* Typography */
    --pci-font-family: 'Barlow', system-ui, -apple-system, sans-serif;

    /* Spacing & Layout */
    --pci-radius-sm: 0.5rem;
    /* 8px */
    --pci-radius-md: 1rem;
    /* 16px */
    --pci-radius-lg: 1.5rem;
    /* 24px */

    /* Shadows */
    --pci-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    --pci-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --pci-shadow-card-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
}

body {
    font-family: var(--pci-font-family);
}

/* Typography Utilities */
.pci-heading-xl {
    font-weight: 800;
    font-size: 2.5rem;
    color: var(--pci-slate-900);
}

.pci-heading-lg {
    font-weight: 700;
    font-size: 2rem;
    color: var(--pci-slate-900);
}

.pci-heading-md {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--pci-slate-900);
}

.pci-text-lead {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--pci-slate-500);
}

.pci-tag {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--pci-primary);
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Components */

/* Buttons */
.btn-pci-primary {
    background: var(--pci-gradient-primary);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50rem;
    /* Pill shape */
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-pci-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    color: white;
}

/* Cards */
.pci-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: var(--pci-radius-lg);
    padding: 2rem;
    box-shadow: var(--pci-shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pci-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--pci-shadow-card-hover);
    border-color: rgba(13, 110, 253, 0.3);
}

/* Badge */
.pci-badge {
    background: #f0f7ff;
    color: var(--pci-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #e0f2fe;
}

/* Icon Box (Circle) */
.pci-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.1);
    color: var(--pci-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s;
}

.pci-card:hover .pci-icon-box {
    background: var(--pci-primary);
    color: white;
    transform: scale(1.1);
}

/* Drawers (Offcanvas) Premium Styles */
.offcanvas {
    border: none;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    visibility: visible !important; /* Avoid flicker during BS init */
}

.offcanvas-header {
    background: var(--pci-slate-50);
    border-bottom: 1px solid #f1f5f9;
    padding: 1.5rem 2rem;
}

.offcanvas-title {
    font-weight: 800;
    color: var(--pci-slate-900);
    letter-spacing: -0.5px;
}

.offcanvas-body {
    padding: 2rem;
}

/* Custom Widths for Offcanvas */
@media (min-width: 992px) {
    .offcanvas-xxl {
        width: 1200px !important;
        max-width: 95vw !important;
    }
    
    .offcanvas-xl {
        width: 1000px !important;
        max-width: 95vw !important;
    }
    
    .offcanvas-lg {
        width: 800px !important;
        max-width: 90vw !important;
    }
    
    .offcanvas-md {
        width: 600px !important;
        max-width: 80vw !important;
    }
}

.offcanvas-backdrop {
    background-color: var(--pci-slate-900) !important;
    transition: opacity 0.35s ease !important;
}

.offcanvas-backdrop.show {
    opacity: 0.3 !important;
}

/* Apply blur only in browsers that support it and when fully shown to avoid flickering */
@supports (backdrop-filter: blur(4px)) {
    .offcanvas-backdrop.show {
        backdrop-filter: blur(4px);
    }
}

.btn-close-drawer {
    background: rgba(255,255,255,0.15) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 50% !important;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #fff !important;
    opacity: 1 !important;
    padding: 0 !important;
}

.btn-close-drawer i {
    color: #fff !important;
    font-size: 0.9rem;
}

.btn-close-drawer:hover {
    background: rgba(255,255,255,0.28) !important;
    border-color: rgba(255,255,255,0.5) !important;
    color: #fff !important;
}

/* Variante para cabeçalhos claros (bg-light, bg-white) */
.offcanvas-header:not([class*="bg-primary"]):not([class*="bg-dark"]):not([class*="bg-secondary"]) .btn-close-drawer {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    color: var(--pci-slate-500) !important;
}

.offcanvas-header:not([class*="bg-primary"]):not([class*="bg-dark"]):not([class*="bg-secondary"]) .btn-close-drawer i {
    color: #64748b !important;
}

.offcanvas-header:not([class*="bg-primary"]):not([class*="bg-dark"]):not([class*="bg-secondary"]) .btn-close-drawer:hover {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border-color: #fecaca !important;
}

.offcanvas-header:not([class*="bg-primary"]):not([class*="bg-dark"]):not([class*="bg-secondary"]) .btn-close-drawer:hover i {
    color: #ef4444 !important;
}