/* ==========================================
   住所・氏名 修正専用モーダル＆バッジ用スタイル
   ========================================== */

/* 氏名・住所バッジ共通 */
.editable-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 5px;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    user-select: text;
}

.editable-badge:hover {
    background-color: #e0f2fe !important;
    border-color: #0284c7 !important;
    color: #0369a1 !important;
    box-shadow: 0 1px 4px rgba(2, 132, 199, 0.25);
}

.editable-badge .edit-icon {
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.editable-badge:hover .edit-icon {
    opacity: 1;
}

/* 追跡番号バッジ（ふわっとカラーチェンジ・ホバー効果） */
.tracking-badge-btn {
    transition: all 0.15s ease-in-out !important;
    cursor: pointer !important;
}

.tracking-badge-btn.bg-green {
    background-color: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
}

.tracking-badge-btn.bg-green:hover {
    background-color: #d1fae5 !important;
    border-color: #10b981 !important;
    color: #065f46 !important;
    box-shadow: 0 1px 5px rgba(16, 185, 129, 0.35) !important;
}

.tracking-badge-btn.bg-purple {
    background-color: #f5f3ff !important;
    color: #6d28d9 !important;
    border: 1px solid #ddd6fe !important;
}

.tracking-badge-btn.bg-purple:hover {
    background-color: #ede9fe !important;
    border-color: #8b5cf6 !important;
    color: #5b21b6 !important;
    box-shadow: 0 1px 5px rgba(139, 92, 246, 0.35) !important;
}

.tracking-badge-btn.bg-gray {
    background-color: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

.tracking-badge-btn.bg-gray:hover {
    background-color: #d1fae5 !important;
    border-color: #10b981 !important;
    color: #047857 !important;
    box-shadow: 0 1px 5px rgba(16, 185, 129, 0.35) !important;
}

/* 住所専用編集モーダル */
.address-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    z-index: 45000;
    justify-content: center;
    align-items: center;
}

.address-modal-overlay.active {
    display: flex;
}

.address-modal-container {
    background: #ffffff;
    width: 1235px;
    max-width: 96vw;
    height: 96vh;
    max-height: 96vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.address-modal-header {
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.address-modal-header h3 {
    margin: 0;
    font-size: 15px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.address-modal-close-btn {
    background: transparent;
    border: none;
    font-size: 22px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 2px 8px;
    border-radius: 4px;
}

.address-modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.address-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    gap: 20px;
}

.address-modal-col-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.address-modal-col-right {
    flex: 1;
    min-width: 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.address-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.address-form-group label {
    font-size: 11px;
    font-weight: bold;
    color: #0369a1;
}

.address-form-input {
    width: 100%;
    padding: 7px 10px;
    font-size: 13px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.address-form-input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.address-form-input.highlight-target-input {
    border-color: #0284c7 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.25) !important;
    background-color: #f0f9ff !important;
}

.address-modal-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.address-modal-footer-info {
    font-size: 11px;
    color: #64748b;
}

.address-modal-actions {
    display: flex;
    gap: 10px;
}

.api-compare-box {
    background: #ffffff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 10px;
    margin-top: 6px;
}

.api-compare-title {
    font-size: 11px;
    font-weight: bold;
    color: #0369a1;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.api-apply-btn {
    background: #0284c7;
    color: #ffffff;
    border: none;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.15s;
}

.api-apply-btn:hover {
    background: #0369a1;
}
