/*
Theme Name: flight Market
Author: Hexadec
Version: 1.0.0
*/


/* サイト全体 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================
   ログイン状態メッセージ
============================ */
.fm-user-status {
    font-size: 14px;
    color: #333;
    background: #f0f6ff;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #c7ddff;
    font-weight: bold;
}

body {
    padding-top: 120px;
    /* ヘッダーの高さに合わせて調整※ ヘッダーの高さが 60px なら 60 に、
80px なら 80 に調整 */
}


/* ============================
   Skill Card Grid Layout
============================ */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    padding: 20px;
}

/* ============================
   Skill Card
============================ */
.skill-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform .2s, box-shadow .2s;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.skill-thumb {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
}

.skill-body {
    padding: 16px;
}

.skill-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.skill-price {
    font-size: 20px;
    font-weight: bold;
    color: #0078ff;
    margin-bottom: 8px;
}

.skill-cat {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.skill-rating {
    font-size: 16px;
    color: #ff9800;
    margin-bottom: 12px;
}

.skill-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #0078ff;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: background .2s;
}

.skill-btn:hover {
    background: #005fcc;
}

/* ============================
   Skill Form
============================ */
.skill-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.skill-form label {
    font-weight: bold;
    display: block;
    margin-bottom: 6px;
}

.skill-form input[type="text"],
.skill-form input[type="number"],
.skill-form textarea,
.skill-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 16px;
}

.skill-form input[type="file"] {
    margin-bottom: 16px;
}

.skill-form button {
    width: 100%;
    padding: 12px;
    background: #0078ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.skill-form button:hover {
    background: #005fcc;
}

/*
*スキル投稿ボタンのCSSデザイン
*/

.fm-post-btn {
    display: inline-block;
    padding: 14px 28px;
    background: #0078ff;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    transition: background .2s, transform .2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.fm-post-btn:hover {
    background: #005fcc;
    transform: translateY(-3px);
}

.fm-post-btn {
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 120, 255, 0.5);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 120, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 120, 255, 0);
    }
}

.header-inner {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
}

.fm-post-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0078ff;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background .2s, transform .2s;
}

.fm-post-btn:hover {
    background: #005fcc;
    transform: translateY(-2px);
}

/*
*ボタンのデザイン
*/
.header-inner {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
}

.site-title a {
    text-decoration: none;
    color: inherit;
}

.fm-home-btn,
.fm-post-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0078ff;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background .2s, transform .2s;
}

.fm-home-btn:hover,
.fm-post-btn:hover {
    background: #005fcc;
    transform: translateY(-2px);
}

.fm-list-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0078ff;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background .2s, transform .2s;
}

.fm-list-btn:hover {
    background: #005fcc;
    transform: translateY(-2px);
}

/* ============================
   My Skills / Login / Logout ボタン
============================ */

/* マイスキル（一覧系ボタンと同じデザイン） */
.fm-myskills-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0078ff;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background .2s, transform .2s;
}

.fm-myskills-btn:hover {
    background: #005fcc;
    transform: translateY(-2px);
}

/* ログイン / ログアウト（ホームボタンと同じデザイン） */
.fm-login-btn,
.fm-logout-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0078ff;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background .2s, transform .2s;
}

.fm-login-btn:hover,
.fm-logout-btn:hover {
    background: #005fcc;
    transform: translateY(-2px);
}

/* ============================
   共通キャンセルボタン
============================ */
.fm-cancel-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0078ff;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background .2s, transform .2s;
}

.fm-cancel-btn:hover {
    background: #b5b5b5;
    transform: translateY(-2px);
}

/* ============================
   共通キャンセルボタン（ヘッダー用）
============================ */
.fm-cancel-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0078ff;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background .2s, transform .2s;
}

.fm-cancel-btn:hover {
    background: #b5b5b5;
    transform: translateY(-2px);
}

/* ============================
   新規ユーザー登録
============================ */
.user-register-card {
    max-width: 500px;
    margin: 40px auto;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.user-register-card h2 {
    text-align: center;
    margin-bottom: 20px;
}

.user-register-card label {
    font-weight: bold;
    display: block;
    margin-bottom: 6px;
}

.user-register-card input[type="text"],
.user-register-card input[type="email"],
.user-register-card input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 16px;
}

.user-register-card button {
    width: 100%;
    padding: 12px;
    background: #0078ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 12px;
}

.user-register-card button:hover {
    background: #005fcc;
}

/* キャンセルボタン（フォーム下用） */
.user-register-card .cancel-area {
    text-align: center;
    margin-top: 10px;
}

/* ヘッダーのボタン群を横スクロール可能にする */
.header-buttons {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 5px;
}

.header-buttons::-webkit-scrollbar {
    height: 6px;
}

.header-buttons::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}


 /* ============================
   Header Base
============================ */
.site-header {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 10px 20px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fm-user-status {
    font-size: 14px;
    margin-right: 10px;
}

/* ============================
   ユーザーアイコン
============================ */
.fm-user-icon img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ddd;
}


/* ============================
   Dashboard Cards
============================ */
.dashboard-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
}

.dashboard-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: #333;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.dashboard-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: bold;
}

.dashboard-card p {
    margin: 0;
    font-size: 14px;
    color: #555;
}

/* ============================
   Hamburger Icon (SP)
============================ */
.fm-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.fm-hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 3px;
}


/* ============================
   SP表示
============================ */
@media (max-width: 768px) {

    .fm-hamburger {
        display: flex;
    }

    .fm-nav {
        display: none;
        flex-direction: column;
        gap: 15px;
        background: #fff;
        padding: 15px;
        border-top: 1px solid #ddd;
        width: 100%;
    }

    .fm-nav.open {
        display: flex;
    }
}

/* ============================
   Back to Dashboard Button
============================ */
.back-to-dashboard {
    margin: 20px 0;
}

.back-btn {
    display: inline-block;
    padding: 10px 18px;
    background: #f5f5f5;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    border: 1px solid #ddd;
    transition: background 0.2s ease, transform 0.2s ease;
}

.back-btn:hover {
    background: #e9e9e9;
    transform: translateX(-3px);
}

.skill-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.skill-search-form input,
.skill-search-form select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.skill-search-form button {
    padding: 8px 16px;
    background: #1E88E5;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.contact-btn {
    display: inline-block;
    padding: 10px 16px;
    background: #1E88E5;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 15px;
}

.contact-btn:hover {
    background: #1565C0;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
}

/* favorite */
.favorite-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.favorite-btn:hover {
    background: #f5f5f5;
}

/* LINE風の CSS */
.chat-thread {
    padding: 20px;
    background: #f5f5f5;
    height: 500px;
    overflow-y: scroll;
    border-radius: 10px;
    margin-bottom: 20px;
}

.chat-bubble {
    max-width: 70%;
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    position: relative;
}

.chat-bubble.me {
    background: #1E88E5;
    color: #fff;
    margin-left: auto;
}

.chat-bubble.partner {
    background: #e0e0e0;
    color: #333;
    margin-right: auto;
}

.chat-time {
    font-size: 10px;
    opacity: 0.7;
    display: block;
    margin-top: 4px;
    text-align: right;
}

.chat-form textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.chat-form button {
    margin-top: 10px;
    padding: 10px 16px;
    background: #1E88E5;
    color: #fff;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

/* 未読バッジ */
.badge-new {
    display: inline-block;
    background: #E53935;
    color: #fff;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: bold;
}

.thread-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.thread-avatar img {
    border-radius: 50%;
}

.thread-name {
    font-weight: bold;
}

/* メッセージスレッド内をLINE風に表示する　*/
.chat-thread {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.chat-row {
    display: flex;
    align-items: flex-end;
    width: 100%; /* 横幅いっぱいになる*/
    margin-bottom: 12px;
}

.chat-row.me {
    justify-content: flex-end;
}

.chat-avatar img {
    border-radius: 50%;
}

.chat-row.me .chat-avatar {
    order: 2;
    margin-left: 8px;
}

.chat-row.partner .chat-avatar {
    margin-right: 8px;
}

.chat-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 12px;
    position: relative;
}

.chat-row.me .chat-bubble {
    background: #1E88E5;
    color: #fff;
}

.chat-row.partner .chat-bubble {
    background: #e0e0e0;
    color: #333;
}

.fm-accepted-banner {
    background: #e6f7e6;
    border: 1px solid #8cd48c;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 16px;
    color: #2d662d;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.fm-accepted-banner .icon {
    font-size: 20px;
}

/* 依頼ボタン*/
/* 依頼ボタンを絶対にボタン化する */
.skill-detail a.fm-btn-primary,
.skill-detail a.fm-btn-secondary {
    all: unset !important; /* すべての継承をリセット */
    display: inline-block !important;
    padding: 14px 24px !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    text-decoration: none !important;
    font-weight: bold !important;
    margin-top: 20px !important;
    margin-bottom: 20px !important;
    cursor: pointer !important;
}

/* 色の指定 */
.skill-detail a.fm-btn-primary {
    background: #1E88E5 !important;
    color: #fff !important;
}

.skill-detail a.fm-btn-secondary {
    background: #555 !important;
    color: #fff !important;
}

/* ----------------------------------------------
 * 取引ステータス一覧
 ------------------------------------------------
 */

/* 横スクロール用ラッパー（スマホ対応） */
.fm-dashboard-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}

/* スマホ画面で少し小さく*/
@media (max-width: 600px) {
    .fm-dashboard-table thead th {
        font-size: 16px;
    }
}

/* テーブル本体 */
.fm-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px; /* スマホで横スクロールできるように最低幅を設定 */
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

/* ヘッダー（濃い背景・白文字・SaaSシャドウ） */
.fm-dashboard-table thead th {
    background: #2b4ea2; /* ← 濃いブルー */
    color: #ffffff;      /* ← 白文字 */
    padding: 14px;
    text-align: center;
    font-weight: bold;
    font-size: 15px;     /* ← 文字を大きく */
    white-space: nowrap;
    border-bottom: 2px solid #1f3a7a;

    /* SaaS っぽいシャドウ（下にふわっと） */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 本文セル（SaaS 風デザイン） */
.fm-dashboard-table tbody td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e5e8ef;
    white-space: nowrap;
    font-size: 16px;
    color: #333; /* 文字色を濃くして読みやすく */

    /* SaaS っぽい薄いシャドウ */
    background: #ffffff;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.05);
}

/* 行ホバー */
.fm-dashboard-table tbody tr:hover {
    background: #f9fbff;
}

/* 操作リンク */
.fm-dashboard-table td a {
    color: #0066cc;
    text-decoration: none;
}
.fm-dashboard-table td a:hover {
    text-decoration: underline;
}

/* スマホ対応 */
@media (max-width: 600px) {
    .fm-dashboard-table {
        font-size: 14px;
    }
    .fm-dashboard-table thead th,
    .fm-dashboard-table tbody td {
        padding: 8px;
    }
}

.fm-btn {
    display: inline-block;
    padding: 8px 14px;
    background: #2b4ea2;
    color: #fff !important;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.fm-btn:hover {
    background: #1f3a7a;
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
    transform: translateY(-1px);
}

/* dashboardのスレッド表示部分*/
.message-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.thread-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.thread-avatar img {
    border-radius: 50%;
}

.thread-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.thread-name {
    font-weight: 600;
    font-size: 15px;
}

.thread-skill {
    font-size: 13px;
    color: #666;
}

.badge-new {
    background: #ff4d4f;
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: auto;
    margin-right: 10px;
}

.thread-btn {
    background: #0078ff;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.thread-btn:hover {
    background: #005fcc;
}

.thread-latest {
    color: #555;
    font-size: 14px;
    margin: 0;
}