/* サイドバーコンポーネント - 全ページ共通 */
.sidebar {
    width: 300px;
    flex-shrink: 0;
    background: var(--color-bg-white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-xs);
    overflow: hidden; /* はみ出し防止 */
}

/* 広告エリア */
.sidebar .ad-container,
.sidebar ins,
.sidebar iframe {
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden;
}

.sidebar img {
    max-width: 100%;
    height: auto;
}

.widget {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.widget:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--color-text-primary);
}

/* 検索ウィジェット */
.search-widget .search-form {
    display: flex;
    flex-direction: column;
}

.search-widget .search-form .mb-3 {
    margin-bottom: 1rem;
}

.search-widget .form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background-color: var(--color-bg-white);
    cursor: pointer;
    transition: border-color 0.2s;
}

.search-widget .form-select:focus {
    outline: none;
    border-color: var(--color-hero-text);
    box-shadow: 0 0 0 3px rgba(100, 149, 237, 0.1);
}

.search-widget .btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-widget .btn-primary {
    background-color: var(--color-hero-text);
    color: white;
}

.search-widget .btn-primary:hover {
    background-color: var(--color-hero-text);
    opacity: 0.9;
    transform: translateY(-1px);
}

.category-list,
.shelter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li,
.shelter-list li {
    margin-bottom: 8px;
}

.category-list a,
.shelter-list a {
    color: var(--color-text-tertiary);
    text-decoration: none;
    transition: color 0.2s;
}

.category-list a:hover,
.shelter-list a:hover {
    color: var(--color-hero-text);
}

@media (max-width: 992px) {
    .sidebar {
        margin-top: 30px;
    }
}
