/* Quick Search Widget Styles */
.quick-search-widget {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 320px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(219, 179, 101, 0.2);
    z-index: 1001;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    overflow: hidden;
    max-height: 90vh;
}

/* Ensure widget appears above header */
.quick-search-widget {
    z-index: 1001 !important;
}

.quick-search-widget.collapsed .quick-search-content {
    max-height: 0;
    opacity: 0;
    padding: 0 20px;
}

.quick-search-widget.collapsed .quick-search-toggle i {
    transform: rotate(-90deg);
}

.quick-search-container {
    position: relative;
}

.quick-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-search-header:hover {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
}

.quick-search-title {
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-search-title i {
    color: #dbb365;
    font-size: 18px;
}

.quick-search-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-search-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.quick-search-toggle i {
    transition: transform 0.3s ease;
}

.quick-search-content {
    max-height: 200px;
    opacity: 1;
    padding: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.quick-search-form {
    margin-bottom: 15px;
}

.quick-search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    overflow: hidden;
}

.quick-search-input-group:focus-within {
    border-color: #dbb365;
    box-shadow: 0 0 0 3px rgba(219, 179, 101, 0.1);
}

.quick-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 15px;
    font-size: 14px;
    outline: none;
    color: #333;
    font-family: inherit;
}

.quick-search-input::placeholder {
    color: #6c757d;
}

.quick-search-btn {
    background: linear-gradient(135deg, #dbb365 0%, #c9a052 100%);
    border: none;
    color: white;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
}

.quick-search-btn:hover {
    background: linear-gradient(135deg, #c9a052 0%, #b8903d 100%);
    transform: scale(1.05);
}

.quick-search-btn:active {
    transform: scale(0.95);
}

.quick-search-btn i {
    font-size: 16px;
}

.quick-search-results {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
}

.quick-search-results::-webkit-scrollbar {
    width: 4px;
}

.quick-search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.quick-search-results::-webkit-scrollbar-thumb {
    background: #dbb365;
    border-radius: 2px;
}

.quick-search-loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.quick-search-loading i {
    font-size: 24px;
    animation: spin 1s linear infinite;
    color: #dbb365;
    margin-bottom: 10px;
}

.quick-search-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    border: 1px solid #f5c6cb;
}

.quick-search-success {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    border: 1px solid #c3e6cb;
}

.quick-search-success .result-summary {
    font-weight: 600;
    margin-bottom: 8px;
}

.quick-search-success .result-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.quick-result-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.quick-result-btn:hover {
    background: #218838;
    transform: translateY(-1px);
    color: white;
}

.quick-result-btn.secondary {
    background: #6c757d;
}

.quick-result-btn.secondary:hover {
    background: #5a6268;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quick-search-widget {
        right: 10px;
        left: 10px;
        width: auto;
        top: 70px;
    }
    
    .quick-search-header {
        padding: 12px 15px;
    }
    
    .quick-search-title {
        font-size: 14px;
    }
    
    .quick-search-content {
        padding: 15px;
    }
    
    .quick-search-input {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .quick-search-btn {
        padding: 10px 12px;
        min-width: 40px;
    }
}

@media (max-width: 480px) {
    .quick-search-widget {
        top: 60px;
        right: 5px;
        left: 5px;
    }
}

/* Animation for widget appearance */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.quick-search-widget {
    animation: slideInFromRight 0.5s ease-out;
}

/* Pulse animation for search button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(219, 179, 101, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(219, 179, 101, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(219, 179, 101, 0);
    }
}

.quick-search-btn.pulse {
    animation: pulse 2s infinite;
}

/* Quick Search Tips */
.quick-search-tips {
    margin-top: 10px;
    padding: 10px 0;
    border-top: 1px solid #e9ecef;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6c757d;
    padding: 5px 0;
}

.tip-item i {
    color: #dbb365;
    font-size: 14px;
}

/* Hide tips when results are shown */
.quick-search-results:not(:empty) + .quick-search-tips {
    display: none;
}

/* Enhanced success state */
.quick-search-success {
    animation: slideInFromTop 0.3s ease-out;
}

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

/* Enhanced error state */
.quick-search-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Widget entrance animation */
.quick-search-widget.show {
    animation: slideInFromRight 0.5s ease-out;
}

/* Notification for quick search */
.quick-search-notification {
    position: absolute;
    top: -40px;
    right: 0;
    background: #28a745;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1002;
}

.quick-search-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.quick-search-notification.error {
    background: #dc3545;
}

.quick-search-notification.warning {
    background: #ffc107;
    color: #333;
}
