/**
 * GT-NET 動画ライブラリ管理プラグイン CSS
 */

/* コンテナ（幅はページテンプレート側で制御） */
.gtnet-videos-page {
    width: 100%;
}

/* フィルター・検索UI */
.gtnet-videos-filters {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.gtnet-videos-filter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gtnet-videos-filter-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.gtnet-videos-filter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gtnet-videos-filter-item-search {
    flex: 1;
    min-width: 200px;
}

.gtnet-videos-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gtnet-videos-select,
.gtnet-videos-search-input {
    padding: 0 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.5rem !important;
    font-size: 14px !important;
    line-height: 38px !important;
    height: 38px !important;
    width: 100%;
    max-width: 300px;
    box-sizing: border-box !important;
    background-color: #fff !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.gtnet-videos-select {
    padding-right: 2.5rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
}

.gtnet-videos-search-input {
    max-width: 100%;
}

.gtnet-videos-select:focus,
.gtnet-videos-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* ボタン */
.gtnet-videos-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    background-color: #1e293b;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    height: 38px;
}

.gtnet-videos-btn:hover {
    background-color: #334155;
}

.gtnet-videos-btn:active {
    background-color: #475569;
}

.gtnet-videos-btn-filter,
.gtnet-videos-btn-search {
    min-width: 100px;
}

/* テーブル */
.gtnet-videos-table-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 0 0 1px #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
}

.gtnet-videos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.gtnet-videos-table thead {
    background-color: #000 !important;
}

.gtnet-videos-table th {
    padding: 12px 15px;
    text-align: center;
    font-weight: 700;
    color: #fff !important;
    background: #000 !important;
    border: none !important;
    height: 3rem;
}

/* テーブルヘッダーのテキスト色を強制的に指定 */
.gtnet-videos-table thead th,
.gtnet-videos-th-no,
.gtnet-videos-th-cat,
.gtnet-videos-th-title,
.gtnet-videos-th-play {
    color: #fff !important;
    background-color: #000 !important;
}

.gtnet-videos-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.gtnet-videos-table tbody tr:hover {
    background-color: #f9f9f9;
}

.gtnet-videos-table tbody tr:last-child td {
    border-bottom: none;
}

/* テーブル列幅 */
.gtnet-videos-th-no,
.gtnet-videos-td-no {
    width: 100px;
    white-space: nowrap;
}

.gtnet-videos-th-cat,
.gtnet-videos-td-cat {
    width: 150px;
    white-space: nowrap;
}

.gtnet-videos-th-title,
.gtnet-videos-td-title {
    min-width: 200px;
}

.gtnet-videos-th-play,
.gtnet-videos-td-play {
    width: 120px;
    text-align: center;
}

/* タイトルリンク */
.gtnet-videos-title-link {
    color: #066aab;
    text-decoration: none;
    font-weight: 500;
}

.gtnet-videos-title-link:hover {
    text-decoration: underline;
}

/* 再生ボタン */
.gtnet-videos-play-btn {
    display: inline-block;
    padding: 6px 16px;
    background-color: #16a34a;
    color: #fff;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.gtnet-videos-play-btn:hover {
    background-color: #15803d;
    color: #fff;
}

.gtnet-videos-play-btn:active {
    background-color: #166534;
}

/* 空メッセージ */
.gtnet-videos-empty {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    font-size: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .gtnet-videos-page {
        padding: 0;
    }

    .gtnet-videos-filters {
        padding: 1rem;
    }

    .gtnet-videos-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .gtnet-videos-filter-item {
        width: 100%;
    }

    .gtnet-videos-select,
    .gtnet-videos-search-input {
        max-width: 100%;
    }

    .gtnet-videos-btn {
        width: 100%;
    }

    .gtnet-videos-table-wrapper {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }

    .gtnet-videos-table {
        min-width: 600px;
    }

    .gtnet-videos-table th,
    .gtnet-videos-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .gtnet-videos-th-no,
    .gtnet-videos-td-no {
        width: 80px;
    }

    .gtnet-videos-th-cat,
    .gtnet-videos-td-cat {
        width: 120px;
    }

    .gtnet-videos-th-play,
    .gtnet-videos-td-play {
        width: 100px;
    }

    .gtnet-videos-play-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .gtnet-videos-page {
        padding: 0;
    }

    .gtnet-videos-filters {
        padding: 0.75rem;
    }

    .gtnet-videos-table {
        min-width: 500px;
    }

    .gtnet-videos-table th,
    .gtnet-videos-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
}
