/* Profile Base Template Styles */

/* Search System CSS */
.search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.search-result-description {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 4px;
}

.search-result-meta {
    color: #999;
    font-size: 0.8em;
}

.search-result-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
}

.search-loading {
    padding: 20px;
    text-align: center;
}

.mobile-search-results {
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid #f0f0f0;
}

.search-result-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
    margin-left: 8px;
}

.badge-post { background-color: #e3f2fd; color: #1976d2; }
.badge-notification { background-color: #fff3e0; color: #f57c00; }
.badge-request { background-color: #e8f5e8; color: #388e3c; }
.badge-available_post { background-color: #f3e5f5; color: #7b1fa2; }

/* Fix sidebar logo to prevent image changes on toggle */
.app-sidebar .header-brand1 img {
    transition: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
}

/* Responsive logo sizing */
@media (max-width: 991px) {
    .app-sidebar .header-brand1 img,
    .side-header .header-brand1 img,
    .header-brand-img {
        max-height: 100px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        transform: scale(0.5) !important;
    }
    .app-sidebar .header-brand1,
    .side-header .header-brand1 {
        text-align: left !important;
        justify-content: flex-start !important;
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .app-sidebar .header-brand1 img {
        max-height: 60px !important;
    }
}

@media (max-width: 576px) {
    .app-sidebar .header-brand1 img {
        max-height: 35px !important;
    }
}

@media (min-width: 1200px) {
    .app-sidebar .header-brand1 img {
        max-height: 70px !important;
    }
}

.app-sidebar.sidebar-closed .header-brand1 img,
.app-sidebar.sidebar-mini .header-brand1 img {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.unread-notification {
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
}

/* Auto-hide toast notifications after 5 seconds */
.toast {
    animation: fadeIn 0.3s ease-in;
}

.toast.auto-hide {
    animation: fadeOut 0.3s ease-out 5s forwards;
}

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

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

.dropdown-item {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

.dropdown-item.unread-notification:hover {
    background-color: #e9ecef;
}

.notification-label {
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.notification-text {
    font-size: 11px;
    line-height: 1.2;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-subtext {
    font-size: 10px;
}

.notifyimg {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 50%;
    flex-shrink: 0;
}

.notifyimg i {
    font-size: 11px;
}

/* Auto-dismiss Django messages */
.alert.auto-dismiss-message {
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    cursor: pointer;
    position: relative;
    animation: slideInDown 0.3s ease-out;
}

.alert.auto-dismiss-message.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

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

/* Success message styling */
.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
}

/* Error message styling */
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
}

/* Warning message styling */
.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #ffc107;
}

/* Info message styling */
.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    border-left: 4px solid #17a2b8;
}

/* Hover effect */
.alert.auto-dismiss-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Notification System Styles */
.notifications {
    display: flex !important;
}

.notifications .dropdown-menu {
    z-index: 1000;
}

.notifications .nav-link {
    cursor: pointer;
}

.notifications .dropdown-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.notifications .dropdown-item:last-child {
    border-bottom: none;
}

.notifications .dropdown-item:hover {
    background-color: #f8f9fa;
}

.notifications-menu {
    max-height: 300px;
    overflow-y: auto;
}

.notifications-menu::-webkit-scrollbar {
    width: 6px;
}

.notifications-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.notifications-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.notifications-menu::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.notifications .badge.bg-success {
    color: white !important;
    font-weight: 500;
} 