/**
 * 【鳴白用】フロントエンド商品登録フォーム - フロントエンドスタイル
 * 金色系のエレガントなダークテーマデザイン
 */

/* ==================== メインコンテナ ==================== */
.nakihaku-product-form-wrapper {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2520 100%);
    border-radius: 16px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 8px 32px rgba(184, 134, 11, 0.3);
    color: #e0e0e0;
    border: 1px solid #b8860b;
}

.nakihaku-product-form-wrapper h2 {
    background: linear-gradient(135deg, #d4af37 0%, #f4e6c3 50%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 32px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #b8860b;
}

/* ==================== 商品一覧 ==================== */
.nakihaku-product-list {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid #b8860b;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.2);
}

.nakihaku-no-products {
    text-align: center;
    padding: 40px 20px;
}

.nakihaku-no-products p {
    color: #999;
    font-size: 16px;
    margin: 0;
}

.product-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(184, 134, 11, 0.3);
}

.product-list-header h3 {
    background: linear-gradient(135deg, #d4af37 0%, #f4e6c3 50%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.btn-toggle-all-list {
    background: linear-gradient(135deg, #b8860b 0%, #d4af37 100%);
    border: none;
    color: #000000;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.3);
}

.btn-toggle-all-list:hover {
    background: linear-gradient(135deg, #d4af37 0%, #f4e6c3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.btn-toggle-all-list .toggle-icon {
    transition: transform 0.3s ease;
}

.product-list-content {
    width: 100%;
}

.product-accordion {
    width: 100%;
}

.product-item {
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid rgba(184, 134, 11, 0.3);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    float: none !important;
    flex: none !important;
    clear: both !important;
    box-sizing: border-box !important;
}

.product-item:hover {
    border-color: #b8860b;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.2);
}

.product-item.active {
    border-color: #d4af37;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.product-title {
    color: #d4af37;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.product-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-status.status-publish {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.product-status.status-pending {
    background: rgba(184, 134, 11, 0.2);
    color: #d4af37;
    border: 1px solid rgba(184, 134, 11, 0.3);
}

.product-status.status-draft {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
    border: 1px solid rgba(158, 158, 158, 0.3);
}

.product-sku {
    color: #999;
    font-size: 12px;
    font-family: 'Courier New', monospace;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-edit-product {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-edit-product:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.btn-toggle-item {
    background: transparent;
    border: none;
    color: #d4af37;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle-item:hover {
    background: rgba(184, 134, 11, 0.2);
    border-radius: 4px;
}

.btn-toggle-item .toggle-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

.btn-toggle-item .toggle-icon.rotated {
    transform: rotate(180deg);
}

.product-content {
    padding: 0 20px 20px 20px;
    border-top: 1px solid rgba(184, 134, 11, 0.2);
}

/* バリエーションテーブル */
.variations-table {
    width: 100%;
    margin-top: 16px;
    border-collapse: collapse;
}

.variations-table thead {
    background: rgba(184, 134, 11, 0.1);
    border: 1px solid rgba(184, 134, 11, 0.2);
}

.variations-table th {
    color: #d4af37;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #b8860b;
}

.variations-table td {
    color: #e0e0e0;
    padding: 12px;
    font-size: 14px;
    border-bottom: 1px solid rgba(184, 134, 11, 0.1);
}

.variations-table tbody tr:hover {
    background: rgba(184, 134, 11, 0.05);
}

.variations-table td.price {
    font-weight: 600;
    background: linear-gradient(135deg, #d4af37 0%, #f4e6c3 50%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.variations-table td.stock {
    font-weight: 500;
}

.variations-table td.stock.in-stock {
    color: #4caf50;
}

.variations-table td.stock.out-of-stock {
    color: #f44336;
}

/* ==================== フォーム ==================== */
.nakihaku-product-form {
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid rgba(184, 134, 11, 0.3);
    border-radius: 12px;
    padding: 32px;
}

.form-field {
    margin-bottom: 24px;
}

.form-field label {
    display: block;
    color: #d4af37;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-field .required {
    color: #ff6b6b;
    margin-left: 4px;
}

.form-field input[type="text"],
.form-field textarea,
.form-field input[type="file"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(184, 134, 11, 0.3);
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-field input[type="text"]:focus,
.form-field textarea:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: #d4af37;
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-field textarea {
    resize: vertical;
    font-family: inherit;
}

.form-field small {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 6px;
    line-height: 1.4;
}

.form-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #d4af37;
}

.form-field label input[type="checkbox"] {
    display: inline-block;
    width: auto;
}

#current-image-info {
    background: rgba(184, 134, 11, 0.1);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(184, 134, 11, 0.2);
}

#current-image-info strong {
    color: #d4af37;
}

#current-image-name {
    color: #f4e6c3;
    font-family: 'Courier New', monospace;
}

/* ボタン */
.button {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-block;
}

.button-primary {
    background: linear-gradient(135deg, #b8860b 0%, #d4af37 100%);
    color: #000000;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.3);
}

.button-primary:hover {
    background: linear-gradient(135deg, #d4af37 0%, #f4e6c3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.button-secondary {
    background: rgba(184, 134, 11, 0.2);
    border: 1px solid rgba(184, 134, 11, 0.3);
    color: #d4af37;
}

.button-secondary:hover {
    background: rgba(184, 134, 11, 0.3);
    border-color: #b8860b;
}

/* メッセージ */
.nakihaku-success,
.nakihaku-error {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid;
    font-weight: 500;
}

.nakihaku-success {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4caf50;
    color: #4caf50;
}

.nakihaku-error {
    background: rgba(244, 67, 54, 0.1);
    border-left-color: #f44336;
    color: #f44336;
}

/* ==================== レスポンシブ ==================== */
@media (max-width: 768px) {
    .nakihaku-product-form-wrapper {
        padding: 24px;
        margin: 20px 0;
    }
    
    .product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .product-info {
        width: 100%;
    }
    
    .product-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .variations-table {
        font-size: 13px;
    }
    
    .variations-table th,
    .variations-table td {
        padding: 8px;
    }
}
