/**
 * Automancy News Banner Style Sheet
 * 
 * @package Automancy
 * @version 3.2.07
 */

.automancy-news-banner {
    margin: 24px auto;
    max-width: 1200px;
    background: rgba(253, 250, 242, 0.95);
    border: 1px solid #efe5d1;
    border-left: 4px solid #d4af37;
    border-radius: 6px;
    padding: 16px 24px;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.08);
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.automancy-news-banner:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.12);
}

.automancy-news-banner__header {
    display: flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: #c99a2e;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.automancy-news-banner__header-icon {
    margin-right: 8px;
    font-size: 14px;
    display: inline-block;
    animation: automancy-pulse 2s infinite ease-in-out;
}

.automancy-news-banner__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.automancy-news-banner__item {
    display: flex;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px dashed #efe8d8;
    font-size: 14px;
    line-height: 1.6;
}

.automancy-news-banner__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.automancy-news-banner__item:first-child {
    padding-top: 0;
}

.automancy-news-banner__date {
    font-size: 12px;
    color: #8c7e65;
    font-family: "Fira Code", monospace, sans-serif;
    margin-right: 18px;
    white-space: nowrap;
    flex-shrink: 0;
}

.automancy-news-banner__link {
    color: #4a3c31;
    text-decoration: none;
    position: relative;
    transition: color 0.25s ease;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.automancy-news-banner__link:hover {
    color: #c99a2e;
    text-decoration: none;
}

.automancy-news-banner__link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #c99a2e;
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.automancy-news-banner__link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

@keyframes automancy-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .automancy-news-banner {
        margin: 16px 12px;
        padding: 14px 18px;
    }
    .automancy-news-banner__item {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 0;
    }
    .automancy-news-banner__date {
        margin-right: 0;
        margin-bottom: 4px;
    }
    .automancy-news-banner__link {
        white-space: normal;
        word-break: break-all;
        line-height: 1.4;
    }
}

/* ==========================================================================
   Automancy News Dropdown Bar & Menu Styles (v3.2.11)
   ========================================================================== */
.automancy-news-dropdown-wrap {
    position: fixed;
    top: 60px; /* 固定ヘッダーの高さ (JSで動的に更新されます) */
    left: 0;
    width: 100%;
    height: 32px;
    z-index: 999999 !important; /* z-indexを最前面に大幅に強化 */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-family: "Noto Serif JP", serif;
    transition: background-color 0.3s ease;
    pointer-events: auto !important; /* クリックイベントを確実にキャッチ */
}

/* ログイン時の管理バー補正 */
body.admin-bar .automancy-news-dropdown-wrap {
    top: 92px; /* 60px + 32px */
}

@media screen and (max-width: 782px) {
    body.admin-bar .automancy-news-dropdown-wrap {
        top: 106px; /* 60px + 46px */
    }
}

/* トリガーボタン */
.automancy-news-dropdown-trigger {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #b8973d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    font-family: inherit;
    padding: 0 15px;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.automancy-news-dropdown-trigger:hover {
    color: #8a7040;
    letter-spacing: 0.15em;
}

.automancy-news-dropdown-icon {
    font-size: 13px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.automancy-news-dropdown-wrap.active .automancy-news-dropdown-icon {
    transform: rotate(180deg);
}

/* プルダウンメニューコンテンツ */
.automancy-news-dropdown-content {
    position: absolute;
    top: 32px;
    left: 0;
    width: 100%;
    background: rgba(254, 253, 250, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid #d4af37;
    box-shadow: 0 12px 30px rgba(42, 31, 14, 0.12);
    box-sizing: border-box;
    z-index: 1000000 !important; /* 親コンテナのさらに前面へ */
    pointer-events: auto !important;
    
    /* 滑らかなアコーディオン開閉 */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.3s ease;
}

.automancy-news-dropdown-wrap.active .automancy-news-dropdown-content {
    max-height: 400px;
    opacity: 1;
    visibility: visible;
}

/* リスト構造 */
.automancy-news-dropdown-list {
    list-style: none;
    padding: 12px 24px;
    margin: 0 auto;
    max-width: 900px;
    box-sizing: border-box;
}

.automancy-news-dropdown-item {
    display: flex;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(184, 151, 61, 0.18);
    font-size: 13.5px;
    line-height: 1.5;
}

.automancy-news-dropdown-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.automancy-news-dropdown-item:first-child {
    padding-top: 0;
}

/* 日付 */
.automancy-news-dropdown-date {
    font-size: 11px;
    color: #8c7e65;
    font-family: "Fira Code", monospace, sans-serif;
    margin-right: 18px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* リンク */
.automancy-news-dropdown-link {
    color: #4a3c31;
    text-decoration: none;
    position: relative;
    transition: color 0.25s ease;
    display: inline-block;
    max-width: calc(100% - 110px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.automancy-news-dropdown-link:hover {
    color: #d4af37;
    text-decoration: none;
}

.automancy-news-dropdown-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #d4af37;
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.automancy-news-dropdown-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    .automancy-news-dropdown-list {
        padding: 10px 16px;
    }
    .automancy-news-dropdown-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 0;
    }
    .automancy-news-dropdown-date {
        margin-right: 0;
        margin-bottom: 2px;
    }
    .automancy-news-dropdown-link {
        max-width: 100%;
        white-space: normal;
        word-break: break-all;
        line-height: 1.4;
    }
}

