/* ========================================
   HEADER STYLES - EXTRACTED FROM PHP
   ======================================== */

/* Navigation Badge Styles */
.nav-link-with-badge {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-badge {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(255, 71, 87, 0.3);
    animation: badge-pulse 2s infinite;
    border: 2px solid white;
}

.nav-badge:empty {
    display: none;
}

@keyframes badge-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Dark mode cho nav-badge */
[data-bs-theme="dark"] .nav-badge {
    border-color: #2d3748;
    box-shadow: 0 2px 4px rgba(255, 71, 87, 0.4);
}

/* Mobile nav-badge */
#mobileMenuOverlay .nav-badge {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 8px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(255, 71, 87, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Header Notice */
.header-notice {
  background: linear-gradient(90deg, #ff5f6d, #ffc371);
  color: #fff;
  text-align: center;
  padding: 10px;
  border-radius: 12px;
  margin: 5px auto 15px;
  max-width: 500px;
  font-size: 14px;
  font-weight: bold;
  position: relative;
  animation: pulse 2s infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.header-notice span {
  display: inline-flex;
  align-items: center;
}

.header-notice i {
  font-style: normal;
  font-size: 18px;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,95,109,0.7); }
  70% { box-shadow: 0 0 10px 10px rgba(255,95,109,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,95,109,0); }
}

/* Social Info Notification Styles */
#social-info-notification {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    z-index: 9999 !important;
    max-width: 400px !important;
    width: auto !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: 2px solid rgba(255,255,255,0.2) !important;
    border-radius: 15px !important;
    padding: 16px 20px !important;
    margin: 0 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 20px rgba(102,126,234,0.4) !important;
    backdrop-filter: blur(10px) !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    text-align: left !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    animation: slideInFromRight 0.6s ease-out !important;
}

#social-info-notification:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4), 0 0 30px rgba(102,126,234,0.6) !important;
    border-color: rgba(255,255,255,0.4) !important;
}

#social-info-notification i:first-child {
    color: #ffeb3b !important;
    margin-right: 10px !important;
    font-size: 16px !important;
    animation: pulse 2s infinite !important;
}

#social-info-notification i:last-child {
    margin-left: 10px !important;
    font-size: 16px !important;
    transition: transform 0.3s ease !important;
}

#social-info-notification:hover i:last-child {
    transform: translateX(5px) !important;
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.pulse-animation {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Loading State Effects */
.loading-state {
    position: relative;
    overflow: hidden;
}

.loading-state::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.loading-state .loading-text {
    animation: pulse-text 1s infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Modal Update Effects */
#socialInfoModal.updating .modal-content {
    animation: modal-pulse 2s infinite;
    border: 2px solid #007bff;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}

@keyframes modal-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
    }
    50% { 
        transform: scale(1.01);
        box-shadow: 0 0 30px rgba(0, 123, 255, 0.5);
    }
}

#socialInfoModal.updating .form-control {
    background-color: #f8f9fa;
    border-color: #007bff;
    transition: all 0.3s ease;
}

#socialInfoModal.updating .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: #007bff;
}

/* Social Update Button Effects */
.btn-update-social {
    transition: all 0.2s ease !important;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-update-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-update-social:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

.btn-update-social:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Ripple Effect */
.btn-update-social::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-update-social:active::after {
    width: 300px;
    height: 300px;
}

/* Dropdown Menu */
.dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-item {
    white-space: normal;
    padding: 0.75rem 1rem;
    min-width: 200px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Refund Menu Styles */
.nav-link[href="/hoantien"] {
    color: #28a745 !important;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link[href="/hoantien"]:hover {
    color: #218838 !important;
    transform: translateY(-1px);
}

.nav-link[href="/hoantien"].active {
    color: #155724 !important;
    background-color: rgba(40, 167, 69, 0.1);
    border-radius: 6px;
    padding: 8px 12px;
}

.nav-link[href="/hoantien"] i {
    color: #28a745;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile Menu Refund Styles */
.mobile-menu-overlay .nav-link[href="/hoantien"] {
    color: #28a745 !important;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.mobile-menu-overlay .nav-link[href="/hoantien"]:hover {
    background-color: rgba(40, 167, 69, 0.1);
    transform: translateX(5px);
}

.mobile-menu-overlay .nav-link[href="/hoantien"].active {
    background-color: rgba(40, 167, 69, 0.2);
    color: #155724 !important;
}

/* Custom Breakpoints */
@media (max-width: 1485px) {
    .d-xl-custom-flex {
        display: none !important;
    }
    
    .d-xl-custom-none {
        display: block !important;
    }
}

@media (min-width: 1486px) {
    .d-xl-custom-flex {
        display: flex !important;
    }
    
    .d-xl-custom-none {
        display: none !important;
    }
}

/* Responsive Social Info Notification */
@media (max-width: 768px) {
    #social-info-notification {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
        width: auto !important;
        font-size: 13px !important;
        padding: 12px 16px !important;
    }
}

@media (max-width: 480px) {
    #social-info-notification {
        font-size: 12px !important;
        padding: 10px 14px !important;
        border-radius: 12px !important;
    }
    
    #social-info-notification i:first-child,
    #social-info-notification i:last-child {
        font-size: 14px !important;
    }
}

/* Modal Z-index */
.modal {
    z-index: 10500 !important;
}

.modal-backdrop {
    z-index: 10400 !important;
}

/* Language Switcher Styles */
.language-switcher {
    margin-right: 10px;
}

.language-switcher .btn {
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.language-switcher .btn:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.language-switcher .btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: #80bdff;
}

.language-switcher .dropdown-menu {
    min-width: 160px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e9ecef;
    padding: 4px 0;
}

.language-switcher .dropdown-item {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
    background: none;
}

.language-switcher .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.language-switcher .dropdown-item img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.language-switcher .dropdown-item.active {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

/* Mobile Language Switcher */
.mobile-language-switcher {
    margin-top: 20px;
    padding: 15px;
    border-top: 1px solid #e9ecef;
}

.language-options-mobile {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.language-btn-mobile {
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 60px;
    justify-content: center;
}

.language-btn-mobile:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.language-btn-mobile.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.language-btn-mobile img {
    width: 16px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
}

/* Legacy styles for backward compatibility */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-icon {
    cursor: pointer;
    font-size: 20px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
}

.lang-icon:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.lang-icon.active {
    background-color: #fafafa;
    color: white;
}

.lang-icon.active::after {
    content: '✓';
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 12px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Responsive language switcher */
@media (max-width: 768px) {
    .language-switcher {
        margin-right: 5px;
    }
    
    .language-switcher .btn {
        font-size: 11px;
        padding: 5px 8px;
    }
    
    .lang-switcher {
        gap: 4px;
    }
    
    .lang-icon {
        font-size: 18px;
        padding: 3px 6px;
    }
}
