/* ========================================
   GLOBAL PURPLE GRADIENT THEME - SUBTLE VERSION
   Applied to buttons and interactive elements
   ======================================== */

/* Primary Buttons - Purple Gradient */
.btn-primary,
.btn-success {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-success:hover {
    background: linear-gradient(135deg, #5568d3 0%, #65408b 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:active,
.btn-success:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* ==========================================
   SEARCH BAR CONTAINER - SUBTLE PURPLE THEME
   ========================================== */

/* Search Input - Subtle Purple Border on Focus */
.search-bar-container .form-control {
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.search-bar-container .form-control:focus {
    border-color: rgba(102, 126, 234, 0.4) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.1) !important;
}

/* Search Input Placeholder - Purple */
.search-bar-container .form-control::placeholder,
.mobile-top-bar .form-control::placeholder {
    color: rgba(102, 126, 234, 0.6) !important;
    opacity: 1;
}

.search-bar-container .form-control::-webkit-input-placeholder,
.mobile-top-bar .form-control::-webkit-input-placeholder {
    color: rgba(102, 126, 234, 0.6) !important;
}

.search-bar-container .form-control::-moz-placeholder,
.mobile-top-bar .form-control::-moz-placeholder {
    color: rgba(102, 126, 234, 0.6) !important;
}

.search-bar-container .form-control:-ms-input-placeholder,
.mobile-top-bar .form-control:-ms-input-placeholder {
    color: rgba(102, 126, 234, 0.6) !important;
}

/* Categories Dropdown Button - Subtle Purple */
.search-bar-container .dropdown .btn-outline-secondary {
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: rgba(102, 126, 234, 0.85);
    transition: all 0.3s ease;
}

.search-bar-container .dropdown .btn-outline-secondary:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
}

.search-bar-container .dropdown .btn-outline-secondary:focus {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.1);
}

/* Kategorije Button Text - Purple by Default */
#categoriesDropdown .d-none.d-sm-inline,
#categoriesDropdown .d-inline.d-sm-none,
#categoriesDropdown span {
    color: rgba(102, 126, 234, 0.85) !important;
    transition: color 0.3s ease;
}

#categoriesDropdown:hover .d-none.d-sm-inline,
#categoriesDropdown:hover .d-inline.d-sm-none,
#categoriesDropdown:hover span {
    color: #667eea !important;
}

/* Search Button - Subtle Purple Outline */
.search-bar-container .btn-success,
.mobile-top-bar .btn-success {
    background: white !important;
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    color: rgba(102, 126, 234, 0.85) !important;
    box-shadow: none !important;
}

.search-bar-container .btn-success:hover,
.mobile-top-bar .btn-success:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

.search-bar-container .btn-success i,
.mobile-top-bar .btn-success i {
    color: rgba(102, 126, 234, 0.85);
    transition: color 0.3s ease;
}

.search-bar-container .btn-success:hover i,
.mobile-top-bar .btn-success:hover i {
    color: white !important;
}

/* Objavi Oglas Button - Subtle Purple Outline */
.search-bar-container .btn.btn-success.d-none.d-md-flex,
button.btn.btn-success[onclick*="RedirectToAddArticle"],
a.btn.btn-success[href="/add-article"] {
    background: white !important;
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    color: rgba(102, 126, 234, 0.85) !important;
    box-shadow: none !important;
}

.search-bar-container .btn.btn-success.d-none.d-md-flex:hover,
button.btn.btn-success[onclick*="RedirectToAddArticle"]:hover,
a.btn.btn-success[href="/add-article"]:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

.search-bar-container .btn.btn-success.d-none.d-md-flex i,
button.btn.btn-success[onclick*="RedirectToAddArticle"] i,
a.btn.btn-success[href="/add-article"] i {
    color: rgba(102, 126, 234, 0.85);
}

.search-bar-container .btn.btn-success.d-none.d-md-flex:hover i,
button.btn.btn-success[onclick*="RedirectToAddArticle"]:hover i,
a.btn.btn-success[href="/add-article"]:hover i {
    color: white !important;
}

/* User Dropdown Button - Subtle Purple */
.search-bar-container .dropdown .btn-outline-secondary#userDropdown {
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: rgba(102, 126, 234, 0.85);
    transition: all 0.3s ease;
}

.search-bar-container .dropdown .btn-outline-secondary#userDropdown:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
}

.search-bar-container .dropdown .btn-outline-secondary#userDropdown:focus {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.1);
}

/* Username Text - Purple by Default */
#userDropdown .d-none.d-xl-inline {
    color: rgba(102, 126, 234, 0.85) !important;
    transition: color 0.3s ease;
}

#userDropdown:hover .d-none.d-xl-inline {
    color: #667eea !important;
}

/* Messages Button - Subtle Purple Outline */
.messages-btn,
button.btn.btn-outline-secondary.messages-btn {
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    background: white !important;
    transition: all 0.3s ease;
}

.messages-btn:hover,
button.btn.btn-outline-secondary.messages-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Messages Icon - Softer Purple */
.messages-btn i.bi-envelope-fill,
button.btn.btn-outline-secondary.messages-btn i {
    color: rgba(102, 126, 234, 0.7) !important;
    transition: color 0.3s ease;
}

.messages-btn:hover i.bi-envelope-fill,
button.btn.btn-outline-secondary.messages-btn:hover i {
    color: white !important;
}

/* Keep unread badge red */
.messages-btn .badge.bg-danger,
.messages-btn .unread-badge {
    background-color: #dc3545 !important;
}

/* ==========================================
   QUICK CATEGORIES BAR - PURPLE THEME
   ========================================== */

/* Quick Categories Text - Purple by Default */
.quick-categories-bar .btn-outline-secondary span {
    color: rgba(102, 126, 234, 0.85) !important;
    transition: color 0.3s ease;
}

.quick-categories-bar .btn-outline-secondary:hover span {
    color: white !important;
}

/* ==========================================
   END SEARCH BAR CONTAINER
   ========================================== */

/* Kategorije Dropdown Button Icon - Softer Purple */
#categoriesDropdown i.bi-list.text-primary,
#mobileBottomCategoriesDropdown i.bi-grid-3x3-gap-fill {
    color: rgba(102, 126, 234, 0.7) !important;
}

/* Profile Dropdown Icons - Softer Purple */
.dropdown-item i.text-primary {
    color: rgba(102, 126, 234, 0.7) !important;
}

.dropdown-item i.text-info {
    color: rgba(102, 126, 234, 0.7) !important;
}

/* Categories Dropdown "Sve" Link - Softer Purple */
.categories-dropdown .text-primary {
    color: rgba(102, 126, 234, 0.8) !important;
}

.categories-dropdown button.dropdown-item .text-primary {
    color: rgba(102, 126, 234, 0.8) !important;
}

/* Outline Primary Buttons - Subtle */
.btn-outline-primary {
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    color: #667eea !important;
    background: transparent !important;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: transparent !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Outline Secondary Buttons - Subtle (for other buttons not in search bar) */
.btn-outline-secondary {
    border: 1px solid rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
}

.btn-outline-secondary:focus {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.1);
}

/* Dropdown Toggle Show State - Purple Background */
.btn-outline-secondary.dropdown-toggle.show,
.btn-outline-secondary.dropdown-toggle:active {
    background: rgba(102, 126, 234, 0.1) !important;
    border-color: rgba(102, 126, 234, 0.4) !important;
    color: #667eea !important;
}

/* Fix Bootstrap's gray background on show */
.show > .btn-outline-secondary.dropdown-toggle {
    background-color: rgba(102, 126, 234, 0.1) !important;
    border-color: rgba(102, 126, 234, 0.4) !important;
    color: #667eea !important;
}

/* Info Buttons - Cyan/Blue Gradient */
.btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.2);
    transition: all 0.3s ease;
}

.btn-info:hover {
    background: linear-gradient(135deg, #3d8dd5 0%, #00d3e6 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

/* Dropdown Menu Styling - Subtle Purple Theme */
.dropdown-menu {
    border: 1px solid rgba(102, 126, 234, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    transition: all 0.2s ease;
    color: #2d3748;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.dropdown-item:active,
.dropdown-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

/* Dropdown Item Icons - Keep original color unless hovered */
.dropdown-item i {
    transition: color 0.2s ease;
}

.dropdown-item:hover i,
.dropdown-item:focus i,
.dropdown-item.active i {
    color: white !important;
}

/* Specific Icon Colors - Override to white on hover */
.dropdown-item:hover .text-primary,
.dropdown-item:hover .text-info,
.dropdown-item:hover .text-warning,
.dropdown-item:hover .text-danger,
.dropdown-item:hover .text-success,
.dropdown-item:hover .text-secondary {
    color: white !important;
}

/* Categories Dropdown Specific Styling */
.categories-dropdown .dropdown-item {
    border-radius: 6px;
    margin-bottom: 4px;
}

.categories-dropdown .dropdown-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%) !important;
    color: #667eea !important;
}

.categories-dropdown .dropdown-item:hover i {
    color: #667eea !important;
}

.categories-dropdown button.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%) !important;
    color: #667eea !important;
}

.categories-dropdown button.dropdown-item:hover .text-primary {
    color: #667eea !important;
}

/* Badge Styling - Purple Theme */
.badge-primary,
.badge.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

/* Links - Purple Hover */
a:not(.btn):not(.nav-link):not(.dropdown-item):not(.footer-links a):not(.social-link) {
    transition: color 0.2s ease;
}

a:not(.btn):not(.nav-link):not(.dropdown-item):not(.footer-links a):not(.social-link):hover {
    color: #667eea !important;
}

/* Form Focus States - Subtle Purple Accent */
.form-control:focus,
.form-select:focus {
    border-color: rgba(102, 126, 234, 0.5) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15) !important;
}

.form-check-input:checked {
    background-color: #667eea !important;
    border-color: #667eea !important;
}

/* Active/Selected States */
.nav-pills .nav-link.active,
.list-group-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: transparent !important;
}

/* Pagination */
.pagination .page-link {
    color: #667eea;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

/* Progress Bars */
.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Alerts - Purple Theme */
.alert-primary {
    background: rgba(102, 126, 234, 0.08) !important;
    border-color: rgba(102, 126, 234, 0.15) !important;
    color: #667eea !important;
}

/* Spinners */
.spinner-border-primary,
.spinner-grow-primary {
    color: #667eea !important;
}

/* Tab Navigation */
.nav-tabs .nav-link.active {
    color: #667eea !important;
    border-bottom: 2px solid #667eea !important;
}

.nav-tabs .nav-link:hover {
    color: #667eea !important;
}

/* Card Hover Effects */
.card-hover-effect {
    transition: all 0.3s ease;
}

.card-hover-effect:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.12);
}

/* Text Purple - Utility Class */
.text-purple {
    color: #667eea !important;
}

.bg-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Tooltips */
.tooltip-inner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: #667eea !important;
}

.bs-tooltip-end .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
    border-right-color: #667eea !important;
}

.bs-tooltip-bottom .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
    border-bottom-color: #667eea !important;
}

.bs-tooltip-start .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
    border-left-color: #667eea !important;
}

/* Modal Header */
.modal-header {
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

/* Switch/Toggle */
.form-switch .form-check-input:checked {
    background-color: #667eea !important;
    border-color: #667eea !important;
}

/* Scrollbar Styling (Webkit browsers) */
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #65408b 100%);
}

/* Selection Color */
::selection {
    background-color: rgba(102, 126, 234, 0.2);
    color: #2d3748;
}

::-moz-selection {
    background-color: rgba(102, 126, 234, 0.2);
    color: #2d3748;
}

/* ==========================================
   PROFILE PAGE & ADD ARTICLE - PURPLE THEME
   ========================================== */

/* Profile Page - Nav Tabs Purple Theme */
.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: #667eea;
    border-bottom-color: rgba(102, 126, 234, 0.3);
}

.nav-tabs .nav-link.active {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.05);
    border-bottom: 2px solid #667eea !important;
    font-weight: 600;
}

.nav-tabs .nav-link.active i {
    color: #667eea !important;
}

.nav-tabs .nav-link i {
    transition: color 0.3s ease;
}

.nav-tabs .nav-link:hover i {
    color: #667eea;
}

/* Add Article Page - Card Body with Subtle Purple Background */
.container .card .card-body {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
}

/* Add Article Page - Card Header Purple Theme */
.container .card .card-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-bottom: 2px solid rgba(102, 126, 234, 0.15);
}

.container .card .card-header h4 {
    color: #667eea;
}

/* Profile Page - Card styling */
.container .card {
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.container .card:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

/* Progress Bar in Add Article - Purple */
.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Step Indicator Active State */
.step-indicator.active {
    color: #667eea;
}

.step-indicator.current {
    transform: scale(1.1);
}

.step-indicator.active i {
    color: #667eea !important;
}

/* ==========================================
   BREADCRUMB - PURPLE THEME
   ========================================== */

/* Breadcrumb Links - Purple */
.breadcrumb-item a {
    color: #667eea !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #764ba2 !important;
    text-decoration: underline;
}

/* Breadcrumb Active Item - Darker Purple */
.breadcrumb-item.active {
    color: rgba(102, 126, 234, 0.7) !important;
}

/* Breadcrumb Divider - Purple */
.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(102, 126, 234, 0.5) !important;
}

/* Breadcrumb Container Background */
.breadcrumb {
    background-color: rgba(102, 126, 234, 0.03);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(102, 126, 234, 0.08);
}
