/* ============================================
   Custom Component Styling with Tailwind Colors
   ============================================ */

/* Alpine.js x-cloak directive */
[x-cloak] { 
    display: none !important; 
}

/* ============================================
   Row Selection Styling (Bootstrap Override)
   ============================================ */
/* Note: Main row selection is in datatables.css, 
   these are Bootstrap-specific overrides */

tr.selected-row,
tr.table-info.selected-row {
    background-color: #bfdbfe !important;   /* Tailwind blue-200 */
}

tr.selected-row:hover,
tr.table-info.selected-row:hover {
    background-color: #93c5fd !important;   /* Tailwind blue-300 */
}

/* Ensure Bootstrap table-info doesn't override when not selected */
tr.table-info:not(.selected-row) {
    background-color: transparent !important;
}

/* ============================================
   Project-dependent Elements
   ============================================ */

/* Project-dependent elements - hidden by default, shown when project is selected */
.project-dependent {
    display: none;
}

.project-dependent.show {
    display: block;
}

/* ============================================
   Select2 Tailwind Integration
   ============================================ */

.select2-container .select2-selection--single {
    height: 2.5rem !important;
    border: 1px solid #d1d5db !important;   /* Tailwind gray-300 */
    border-radius: 0.375rem !important;     /* Tailwind rounded-md */
    padding: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 2.25rem !important;
    padding-left: 0.75rem !important;       /* Tailwind pl-3 */
    color: #374151 !important;              /* Tailwind gray-700 */
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 2.25rem !important;
    right: 0.5rem !important;               /* Tailwind right-2 */
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #3b82f6 !important;       /* Tailwind blue-500 */
    box-shadow: 0 0 0 1px #3b82f6 !important;
}

/* ============================================
   Custom Sidebar Scrollbar
   ============================================ */

.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: #374151;                     /* Tailwind gray-700 */
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: #6b7280;                     /* Tailwind gray-500 */
    border-radius: 2px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;                     /* Tailwind gray-400 */
}

/* ============================================
   Product Card Interactions
   ============================================ */

.product-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    /* Allow per-section override via CSS variable */
    background-color: var(--card-bg-color, #E1DACD);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.product-card:active {
    transform: translateY(-1px) scale(0.98);
}

.product-details {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth transitions for showing/hiding elements */
.product-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Enhanced button hover effects */
.product-details button {
    transition: all 0.2s ease;
}

.product-details button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Feature list styling improvements */
.product-card ul li {
    transition: transform 0.2s ease;
}

.product-card:hover ul li {
    transform: translateX(2px);
}

/* Technical details grid improvements */
.product-details .grid > div {
    transition: transform 0.2s ease;
}

.product-details .grid > div:hover {
    transform: translateX(4px);
}

/* ============================================
   Strength Card Styles (shared across templates)
   ============================================ */

.strength-card {
    background: #E1DACD;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
}

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

.strength-title {
    font-size: 1.25rem !important;         /* Tailwind text-lg */
    font-weight: 600 !important;
    color: #111827 !important;              /* Tailwind gray-900 */
    margin-bottom: 0.75rem;
}

.strength-description {
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.625;
}

.strength-icon {
    margin: 0 auto;
    display: block;
}

/* Remove the overly specific SVG transforms that make icons too large */
.strength-icon svg {
    width: 4rem !important;                 /* Match image icon size */
    height: 4rem !important;                /* Match image icon size */
    margin: 0 auto;
}

.strength-icon img {
    width: 4rem !important;                 /* 64px - twice the original size */
    height: 4rem !important;                /* 64px - twice the original size */
    margin: 0 auto;
}

/* ============================================
   Strength Card Styles - Small Version for Homepage
   ============================================ */

.strength-icon-small {
    width: 2rem;
    height: 2rem;
    margin: 0 auto 0.75rem auto;
    display: block;
    color: #374151;
}

.strength-icon-small svg[viewBox="0 0 100 140"] {
    transform: scale(0.6);
}

.strength-icon-small svg[viewBox="0 0 200 120"] {
    transform: scale(1.2) translateY(0.25rem);
}

.strength-icon-small svg[viewBox="0 0 251 179"] {
    transform: scale(2.4);
}

.strength-title-small {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin-bottom: 0.5rem;
}

.strength-description-small {
    color: #4b5563 !important;
    font-size: 0.8rem !important;
    line-height: 1.5;
}
