/**
 * Gateway Course Search Styles
 * 
 * Clean and professional search module styling
 */

/* Container */
.gateway-course-search-wrapper {
    width: 100%;
    padding: 2rem 1rem;
}

.gcs-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 2rem;
}

@media (min-width: 768px) {
    .gcs-container {
        padding: 3rem;
    }
}

/* Header Section */
.gcs-header {
    margin-bottom: 2rem;
}

.gcs-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .gcs-title {
        font-size: 3rem;
    }
}

.gcs-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* Content Area */
.gcs-content {
    max-width: 64rem;
    margin: 0 auto;
}

/* Search Box */
.gcs-search-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.gcs-search-box {
    position: relative;
    background: linear-gradient(135deg, #262474, #1b60aa, #24906b, #6db460);
    border-radius: 30px;
    padding: 3px;
    display: block;
}

.gcs-search-input {
    width: 100% !important;
    padding: 1rem 8rem 1rem 1.5rem !important;
    font-size: 1.125rem !important;
    border: none !important;
    border-radius: 27px !important;
    outline: none !important;
    transition: all 0.3s ease;
    background: #ffffff !important;
    display: block !important;
    position: relative;
    z-index: 1;
    margin: 0 !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.gcs-search-input:focus {
    box-shadow: 0 0 0 4px rgba(38, 36, 116, 0.1) !important;
    border: none !important;
    outline: none !important;
}

.gcs-search-input::placeholder {
    color: #9ca3af;
}

/* Button Group */
.gcs-button-group {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
}

.gcs-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #111827;
    color: #ffffff;
}

.gcs-btn:hover {
    background: #1f2937;
    transform: scale(1.05);
}

.gcs-btn svg {
    width: 20px;
    height: 20px;
}

.gcs-filter-btn {
    position: relative;
    background: #4b5563;
}

.gcs-filter-btn:hover,
.gcs-filter-btn.active {
    background: #374151;
}

.gcs-filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #3b82f6;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Search Suggestions */
.gcs-suggestions {
    position: absolute;
    width: 100%;
    margin-top: 0.5rem;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    z-index: 20;
    max-height: 400px;
    overflow-y: auto;
}

.gcs-suggestion-item {
    padding: 1rem;
    border-bottom: 2px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.gcs-suggestion-item:hover {
    background: #f9fafb;
}

.gcs-suggestion-code {
    font-weight: 600;
    color: #3b82f6;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.gcs-suggestion-title {
    color: #111827;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.gcs-suggestion-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gcs-suggestion-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #6b7280;
}

.gcs-suggestion-tag.type {
    background: #dbeafe;
    color: #1e40af;
}

/* View All Link */
.gcs-view-all {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.gcs-view-all-link {
    color: #6b7280;
    text-decoration: underline;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.gcs-view-all-link:hover {
    color: #111827;
}

/* Filter Panel */
.gcs-filter-panel {
    background: #ffffff;
    border-radius: 1rem;
    border: 2px solid #e5e7eb;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gcs-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.gcs-filter-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.gcs-filter-close {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gcs-filter-close:hover {
    color: #6b7280;
}

/* Filter Grid */
.gcs-filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .gcs-filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gcs-filter-group-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem 0;
}

.gcs-filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Checkbox Styles */
.gcs-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.gcs-checkbox-label:hover {
    color: #111827;
}

.gcs-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    margin-right: 0.75rem;
    cursor: pointer;
    appearance: none;
    background: #ffffff;
    transition: all 0.2s ease;
    position: relative;
}

.gcs-checkbox:checked {
    background: #3b82f6;
    border-color: #3b82f6;
}

.gcs-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.gcs-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.gcs-checkbox-label span {
    color: #374151;
    font-size: 0.9375rem;
}

/* Filter Footer */
.gcs-filter-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
    text-align: right;
}

.gcs-clear-all {
    background: transparent;
    border: none;
    color: #6b7280;
    text-decoration: underline;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.gcs-clear-all:hover {
    color: #111827;
}

/* Responsive */
@media (max-width: 767px) {
    .gcs-title {
        font-size: 2rem;
    }
    
    .gcs-search-input {
        font-size: 1rem;
        padding-right: 7rem;
    }
    
    .gcs-button-group {
        gap: 0.25rem;
    }
    
    .gcs-btn {
        padding: 0.625rem;
    }
    
    .gcs-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gcs-suggestions,
.gcs-filter-panel {
    animation: fadeIn 0.3s ease;
}