/* スライドショーのスタイル */
.slideshow-container {
    position: relative;
    max-width: 100%;
    margin: 20px auto;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* フルスクリーンモード */
.slideshow-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    z-index: 999999 !important;
}

.slideshow-fullscreen-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    z-index: 999999 !important;
}

/* デジタルサイネージ用のUIを非表示 */
.slideshow-hide-ui .slide-btn,
.slideshow-hide-ui .slide-indicators,
.slideshow-hide-ui .slide-caption,
.slideshow-hide-ui .fullscreen-btn {
    display: none !important;
}

.slides-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

/* フルスクリーン時のスライドラッパー */
.slideshow-fullscreen .slides-wrapper,
.slideshow-fullscreen-active .slides-wrapper {
    height: 100vh !important;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background-color: #000;
}

.slide.active {
    opacity: 1;
}

.slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
}

.slide video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* フルスクリーン時のメディア表示 */
.slideshow-fullscreen .slide img,
.slideshow-fullscreen-active .slide img,
.slideshow-fullscreen .slide video,
.slideshow-fullscreen-active .slide video {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    object-position: center;
    max-width: none;
    max-height: none;
    display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 20px;
    text-align: center;
}

.slide-caption h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.slide-caption p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* ナビゲーションボタン */
.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    min-width: 50px;
    text-align: center;
}

.slide-btn:hover {
    background-color: rgba(0,0,0,0.9);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 20px;
    border-radius: 0 8px 8px 0;
}

.next-btn {
    right: 20px;
    border-radius: 8px 0 0 8px;
}

/* フルスクリーンボタン */
.fullscreen-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    z-index: 15;
    min-width: 45px;
    text-align: center;
}

.fullscreen-btn:hover {
    background-color: rgba(0,0,0,0.9);
    transform: scale(1.05);
}

/* フルスクリーン時はボタンを半透明に */
.slideshow-fullscreen-active .fullscreen-btn,
.slideshow-fullscreen-active .slide-btn {
    opacity: 0.3;
    transition: opacity 0.3s;
}

.slideshow-fullscreen-active:hover .fullscreen-btn,
.slideshow-fullscreen-active:hover .slide-btn {
    opacity: 1;
}

/* インジケーター */
.slide-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;/* ログインセクションのスタイル */
.mms-login-container {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: center;
}

.mms-login-message h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.mms-access-denied {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #dc3232;
    border-radius: 8px;
    background-color: #ffeaea;
    text-align: center;
    color: #dc3232;
}

/* タブスタイル */
.mms-login-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.mms-tab-btn {
    flex: 1;
    padding: 10px 15px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.mms-tab-btn:hover {
    color: #0073aa;
    background-color: #f0f0f0;
}

.mms-tab-btn.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
    font-weight: bold;
}

.mms-tab-content {
    display: none;
}

.mms-tab-content.active {
    display: block;
}

/* ログインフォームスタイル */
.mms-login-form {
    text-align: left;
}

.mms-login-form form {
    margin: 0;
}

.mms-login-form p {
    margin-bottom: 15px;
}

.mms-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.mms-login-form input[type="text"],
.mms-login-form input[type="password"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.mms-login-form input[type="checkbox"] {
    margin-right: 8px;
}

.mms-login-form input[type="submit"] {
    width: 100%;
    padding: 10px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mms-login-form input[type="submit"]:hover {
    background-color: #005177;
}

/* ログインリンクスタイル */
.mms-login-links {
    text-align: center;
}

.mms-login-links p {
    margin: 10px 0;
}

.mms-login-link,
.mms-register-link,
.mms-lost-password-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mms-login-link:hover,
.mms-register-link:hover,
.mms-lost-password-link:hover {
    background-color: #005177;
    text-decoration: none;
}

.mms-register-link {
    background-color: #46b450;
}

.mms-register-link:hover {
    background-color: #399146;
}

.mms-lost-password-link {
    background-color: #666;
}

.mms-lost-password-link:hover {
    background-color: #555;
}

.mms-login-info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.mms-login-info small {
    color: #666;
    font-style: italic;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    .mms-login-container {
        margin: 10px;
        padding: 15px;
    }
    
    .mms-tab-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .mms-login-form input[type="text"],
    .mms-login-form input[type="password"] {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .mms-login-link,
    .mms-register-link,
    .mms-lost-password-link {
        padding: 8px 15px;
        font-size: 14px;
    }
}
#member-upload-form {
    max-width: 600px;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

#member-upload-form .form-group {
    margin-bottom: 15px;
}

#member-upload-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

#member-upload-form input[type="file"],
#member-upload-form input[type="text"],
#member-upload-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

#member-upload-form button {
    background-color: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

#member-upload-form button:hover {
    background-color: #005177;
}

#upload-message {
    margin-top: 15px;
}

/* スライドショーのスタイル */
.slideshow-container {
    position: relative;
    max-width: 100%;
    margin: 20px auto;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.slides-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
}

.slide video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 20px;
    text-align: center;
}

.slide-caption h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.slide-caption p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* ナビゲーションボタン */
.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255,255,255,0.7);
    color: #333;
    border: none;
    padding: 10px 15px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 0 3px 3px 0;
    transition: background-color 0.3s;
    z-index: 10;
}

.slide-btn:hover {
    background-color: rgba(255,255,255,0.9);
}

.prev-btn {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.next-btn {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* インジケーター */
.slide-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator:hover,
.indicator.active {
    background-color: rgba(255,255,255,0.9);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .slides-wrapper {
        height: 300px;
    }
    
    .slide-btn {
        padding: 8px 12px;
        font-size: 16px;
    }
    
    .slide-caption {
        padding: 15px;
    }
    
    .slide-caption h3 {
        font-size: 16px;
    }
    
    .slide-caption p {
        font-size: 12px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .slides-wrapper {
        height: 250px;
    }
    
    .slide-caption {
        padding: 10px;
    }
    
    .slide-caption h3 {
        font-size: 14px;
    }
    
    .slide-caption p {
        font-size: 11px;
    }
}

/* 管理画面のスタイル */
.status-pending {
    color: #f56500;
    font-weight: bold;
}

.status-approved {
    color: #46b450;
    font-weight: bold;
}

.status-rejected {
    color: #dc3232;
    font-weight: bold;
}

.approve-btn {
    background-color: #46b450 !important;
    color: white !important;
    border-color: #46b450 !important;
    margin-right: 5px !important;
}

.reject-btn {
    background-color: #dc3232 !important;
    color: white !important;
    border-color: #dc3232 !important;
    margin-right: 5px !important;
}

.delete-btn {
    background-color: #666 !important;
    color: white !important;
    border-color: #666 !important;
}

/* 管理画面のメディアプレビュー */
.media-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: transform 0.2s ease;
}

.media-thumbnail:hover {
    transform: scale(1.05);
    border-color: #0073aa;
}

.media-preview {
    display: flex;
    align-items: center;
    gap: 10px;
}

.media-info {
    display: flex;
    flex-direction: column;
}

.media-filename {
    font-weight: bold;
    margin-bottom: 2px;
    font-size: 13px;
}

.media-link {
    font-size: 12px;
    color: #0073aa;
    text-decoration: none;
}

.media-link:hover {
    text-decoration: underline;
}

.video-thumbnail {
    background-color: #000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    text-align: center;
    font-weight: bold;
}

/* プレビューモーダル */
.media-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
}

.modal-close:hover {
    color: #000;
}

.modal-media {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* 管理画面テーブルの改善 */
.wp-list-table th,
.wp-list-table td {
    vertical-align: middle;
}

.wp-list-table .column-preview {
    width: 80px;
}

/* レスポンシブ対応（管理画面） */
@media (max-width: 782px) {
    .media-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .media-filename {
        font-size: 11px;
    }
    
    .media-link {
        font-size: 10px;
    }
    
    .modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        padding: 15px;
    }
    
    .approve-btn,
    .reject-btn,
    .delete-btn {
        font-size: 11px !important;
        padding: 3px 6px !important;
        margin: 1px !important;
    }
}

/* ローディング状態 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* フェードイン効果 */
.slide-fade-enter {
    opacity: 0;
}

.slide-fade-enter-active {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.slide-fade-exit {
    opacity: 1;
}

.slide-fade-exit-active {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* アクセシビリティ */
.slide-btn:focus,
.indicator:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* 切り替えエフェクト */
.slideshow-effect-fade .slide {
    transition: opacity 0.5s ease-in-out;
}

.slideshow-effect-slide .slide {
    transition: transform 0.5s ease-in-out;
}

.slideshow-effect-zoom .slide {
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.slideshow-effect-flip .slide {
    transition: transform 0.6s ease-in-out;
    transform-style: preserve-3d;
}

/* スライドエフェクト専用のスタイル */
.effect-slide .slide {
    transform: translateX(0);
}

.effect-slide .slide.slide-enter {
    transform: translateX(100%);
}

.effect-slide .slide.slide-exit {
    transform: translateX(-100%);
}

/* ズームエフェクト専用のスタイル */
.effect-zoom .slide {
    transform: scale(1);
    opacity: 1;
}

.effect-zoom .slide.zoom-enter {
    transform: scale(0.8);
    opacity: 0;
}

.effect-zoom .slide.zoom-exit {
    transform: scale(1.2);
    opacity: 0;
}

/* フリップエフェクト専用のスタイル */
.effect-flip .slide {
    transform: rotateY(0deg);
}

.effect-flip .slide.flip-enter {
    transform: rotateY(90deg);
}

.effect-flip .slide.flip-exit {
    transform: rotateY(-90deg);
}

/* 複数スライドショー対応のスタイル調整 */
[id^="member-slideshow-"] {
    position: relative;
    max-width: 100%;
    margin: 20px auto;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* スライドショーごとの独立したスタイル */
[id^="member-slideshow-"] .slides-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

[id^="member-slideshow-"] .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background-color: #000;
}

[id^="member-slideshow-"] .slide.active {
    opacity: 1;
}

/* レスポンシブ対応の改善 */
@media (max-width: 768px) {
    [id^="member-slideshow-"] .slides-wrapper {
        height: 300px;
    }
}

@media (max-width: 480px) {
    [id^="member-slideshow-"] .slides-wrapper {
        height: 250px;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    #member-upload-form {
        background-color: #2c2c2c;
        border-color: #444;
        color: #fff;
    }
    
    #member-upload-form label {
        color: #fff;
    }
    
    #member-upload-form input[type="file"],
    #member-upload-form input[type="text"],
    #member-upload-form textarea {
        background-color: #444;
        border-color: #666;
        color: #fff;
    }
}