/* Black & Orange Theme for PC Parts App
   Based on the figma-to-html design
   Version: 1.0
*/

/* Theme Variables - centralized for easier maintenance */
:root {
    --theme-black: #1E1E1E;
    --theme-dark-gray: #333333;
    --theme-gray: #555555; 
    --theme-light-gray: #F6F4F0;
    --theme-orange: #F15A29;
    --theme-orange-dark: #d64c20;
    --theme-white: #FFFFFF;
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 19px;
    --card-border-radius: 19px;
    --badge-border-radius: 10px;
    --button-border-radius: 6px;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

/* Global styles */
body {
    color: var(--theme-dark-gray);
}

/* Button styles with consistent transitions */
.btn {
    transition: all var(--transition-speed) ease-in-out;
}

/* Primary button (orange) */
.btn-primary {
    background-color: var(--theme-orange);
    border-color: var(--theme-orange);
}

.btn-primary:hover, 
.btn-primary:focus, 
.btn-primary:active {
    background-color: var(--theme-orange-dark) !important;
    border-color: var(--theme-orange-dark) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Primary outline button */
.btn-outline-primary {
    color: var(--theme-orange);
    border-color: var(--theme-orange);
}

.btn-outline-primary:hover, 
.btn-outline-primary:focus, 
.btn-outline-primary:active {
    color: var(--theme-white);
    background-color: var(--theme-orange);
    border-color: var(--theme-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Dark button (black) */
.btn-dark, .bg-dark {
    background-color: var(--theme-black) !important;
    border-color: var(--theme-black) !important;
}

.btn-dark:hover,
.btn-dark:focus,
.btn-dark:active {
    background-color: var(--theme-dark-gray) !important;
    border-color: var(--theme-dark-gray) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Dark outline button */
.btn-outline-dark {
    color: var(--theme-black);
    border-color: var(--theme-black);
}

.btn-outline-dark:hover, 
.btn-outline-dark:focus, 
.btn-outline-dark:active {
    color: var(--theme-white);
    background-color: var(--theme-black);
    border-color: var(--theme-black);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Special transition for primary action buttons */
.btn-primary-action {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary-action:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 5px 15px rgba(241, 90, 41, 0.3);
}

/* Complete PCs and Hardware & Parts category buttons */
.category-nav .btn-outline-dark {
    transition: all var(--transition-speed) ease;
}

.category-nav .btn-outline-dark:hover {
    color: var(--theme-white);
    background-color: var(--theme-orange);
    border-color: var(--theme-orange);
}

.category-nav .btn-dark:hover {
    background-color: var(--theme-orange) !important;
    border-color: var(--theme-orange) !important;
}

/* Secondary outline button - with hover effect */
.btn-outline-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Card styling with consistent border-radius */
.card {
    border-radius: var(--card-border-radius);
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

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

.card-header {
    background-color: var(--theme-black) !important;
    color: var(--theme-white) !important;
}

/* Primary card header (orange) */
.card-header.bg-primary {
    background-color: var(--theme-orange) !important;
}

/* Navbar styling */
.navbar-brand .fa-microchip {
    color: var(--theme-orange);
    transition: transform 0.3s ease;
}

.navbar-brand:hover .fa-microchip {
    transform: scale(1.2) rotate(10deg);
}

.navbar-dark {
    background-color: var(--theme-black) !important;
}

/* Footer styling */
.footer {
    background-color: var(--theme-black) !important;
}

/* Post icon style */
.post-icon {
    transition: transform 0.3s ease;
}

.btn:hover .post-icon {
    transform: scale(1.2) rotate(10deg);
}

/* Main navbar links hover effect */
.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--theme-orange) !important;
}

/* Primary dropdown items (Complete, Parts, Services) */
.dropdown-item.dropdown-toggle:hover,
.dropdown-item.dropdown-toggle:focus {
    background-color: var(--theme-orange);
    color: var(--theme-white);
}

/* Keep the arrow visible on hover for dropend items */
.dropend .dropdown-toggle:hover::after {
    border-left-color: var(--theme-white);
}

/* Submenu dropdown items */
.dropdown-submenu .dropdown-item:hover,
.dropdown-submenu .dropdown-item:focus {
    background-color: var(--theme-orange);
    color: var(--theme-white);
}

/* Main dropdown categories hover */
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    background-color: var(--theme-orange);
    color: var(--theme-white);
}

/* Active/selected dropdown items */
.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--theme-orange);
    color: var(--theme-white);
}

/* Style the dropdown menu border with a subtle orange hint */
.dropdown-menu {
    border-color: var(--theme-orange);
    border-top: 2px solid var(--theme-orange);
}

/* Primary dropdown items (Complete, Parts, Services) */
.dropdown-menu > li > .dropdown-item.dropdown-toggle:hover,
.dropdown-menu > li > .dropdown-item.dropdown-toggle:focus,
.dropend > .dropdown-item.dropdown-toggle:hover,
.dropend > .dropdown-item.dropdown-toggle:focus {
    background-color: var(--theme-orange) !important;
    color: var(--theme-white) !important;
}

/* More specific selector for dropend items */
.navbar .dropdown-menu .dropend .dropdown-toggle:hover,
.navbar .dropdown-menu .dropend .dropdown-toggle:focus {
    background-color: var(--theme-orange) !important;
    color: var(--theme-white) !important;
}

/* Target the exact structure in your HTML */
#navbarNav .dropdown-menu .dropend .dropdown-item:hover,
#navbarNav .dropdown-menu .dropend .dropdown-item:focus {
    background-color: var(--theme-orange) !important;
    color: var(--theme-white) !important;
}

/* Search button hover effect */
.navbar form .btn-outline-light:hover {
    background-color: var(--theme-orange);
    border-color: var(--theme-orange);
    color: var(--theme-white);
}

/* Add subtle transition */
.navbar form .btn-outline-light {
    transition: all 0.3s ease;
}

/* Optional: Add a slight elevation effect on hover */
.navbar form .btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

/* Make footer microchip icons orange */
footer .fas.fa-microchip {
    color: var(--theme-orange);
}

/* Add a subtle transition effect */
footer .fas.fa-microchip {
    transition: transform 0.3s ease;
}

/* Footer link styling */
footer a.text-light {
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
    padding: 2px 0;
}

/* Orange hover effect */
footer a.text-light:hover {
    color: var(--theme-orange) !important;
}

/* Social icons hover effects */
footer .social-icons a {
    transition: all 0.3s ease;
}

/* Badge and tag styling */
.badge-location, 
.badge-condition, 
.badge-action {
    display: inline-block;
    padding: 3px 13px;
    border-radius: var(--badge-border-radius);
    margin-right: 6px;
    font-size: 11px;
    font-weight: 600;
    background-color: var(--theme-black);
    color: var(--theme-white);
}

.badge-action {
    background-color: var(--theme-orange);
}

/* Price tag styling */
.price-tag {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--theme-black);
    color: var(--theme-white);
    padding: 5px 10px;
    border-bottom-right-radius: 9px;
    font-weight: 600;
}

/* Feature icons in How It Works section */
.feature-icon.bg-primary {
    background-color: var(--theme-orange) !important;
}

.feature-icon.bg-info, 
.feature-icon.bg-danger {
    background-color: var(--theme-black) !important;
}

/* Light background for search areas */
.light-bg {
    background-color: var(--theme-light-gray);
    border-radius: var(--border-radius-sm);
}

/* Links */
a {
    color: var(--theme-orange);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--theme-orange-dark);
}

/* Text colors */
.text-primary {
    color: var(--theme-orange) !important;
}

/* Search button styling */
.search-button {
    background-color: var(--theme-black);
    color: var(--theme-white);
    border-top-right-radius: var(--border-radius-sm);
    border-bottom-right-radius: var(--border-radius-sm);
}

/* Form focus states */
.form-control:focus, 
.form-select:focus {
    border-color: var(--theme-orange);
    box-shadow: 0 0 0 0.2rem rgba(241, 90, 41, 0.25);
}

/* Pagination */
.pagination .page-item.active .page-link {
    background-color: var(--theme-orange);
    border-color: var(--theme-orange);
}

.pagination .page-link {
    color: var(--theme-orange);
}

.pagination .page-link:hover {
    color: var(--theme-orange-dark);
}

/* Chat messages */
.message-sender {
    background-color: var(--theme-orange);
}

.assistant-message {
    border-left: 3px solid var(--theme-orange);
}

/* AI Chat Header */
.ai-chat-header {
    background-color: var(--theme-black);
}

/* Dropdown styling */
.dropdown-item.active, 
.dropdown-item:active {
    background-color: var(--theme-orange);
}

/* Add responsive support */
@media (max-width: 768px) {
    .card {
        border-radius: calc(var(--card-border-radius) * 0.8);
    }
    
    .badge-location, 
    .badge-condition, 
    .badge-action {
        padding: 2px 10px;
        font-size: 10px;
    }
}

/* Loading state for buttons */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading:after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: calc(50% - 0.5rem);
    left: calc(50% - 0.5rem);
    border: 2px solid transparent;
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Style the nav tabs to use orange theme */
.nav-tabs .nav-link.active {
    color: var(--theme-orange);
    border-color: var(--border-color) var(--border-color) #fff var(--border-color);
    border-bottom-color: transparent;
    border-top-color: var(--theme-orange);
    border-top-width: 2px;
}

.nav-tabs .nav-link:hover:not(.active) {
    border-color: #e9ecef #e9ecef #dee2e6;
    color: var(--theme-orange-dark);
}

/* Style pagination */
.pagination .page-link {
    color: var(--theme-orange);
}

.pagination .page-item.active .page-link {
    background-color: var(--theme-orange);
    border-color: var(--theme-orange);
    color: white;
}

.pagination .page-link:hover {
    color: var(--theme-orange-dark);
    background-color: #e9ecef;
}

/* Style buttons in the user profile section */
.btn-outline-primary {
    color: var(--theme-orange);
    border-color: var(--theme-orange);
}

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

/* Style the badge for status */
.badge.bg-primary {
    background-color: var(--theme-orange) !important;
}

.badge.bg-info {
    background-color: var(--theme-black) !important;
}

/* Modal header styling */
.modal-header.bg-info {
    background-color: var(--theme-orange) !important;
}

/* Style links in report modal */
.modal-body a {
    color: var(--theme-orange);
}

.modal-body a:hover {
    color: var(--theme-orange-dark);
}

/* Profile card adjustments */
.card-header.bg-primary {
    background-color: var(--theme-orange) !important;
    border-color: var(--theme-orange) !important;
}

/* Contact support button in modals */
.modal-footer .btn-primary {
    background-color: var(--theme-orange);
    border-color: var(--theme-orange);
}

.modal-footer .btn-primary:hover {
    background-color: var(--theme-orange-dark);
    border-color: var(--theme-orange-dark);
}

/* Make inactive tabs white instead of blue */
.card-header-tabs .nav-link:not(.active) {
    color: var(--theme-white);
}

/* Print styles */
@media print {
    .btn-primary, 
    .btn-dark, 
    .btn-outline-primary, 
    .btn-outline-dark {
        border: 1px solid #000 !important;
        color: #000 !important;
        background: transparent !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .card-header {
        color: #000 !important;
        background: #f0f0f0 !important;
        border-bottom: 1px solid #ddd !important;
    }
}

/* Dark mode consideration (future support) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here for future implementation */
}
