@charset "UTF-8";
/* ============================================
   custom_invoice.css
   請求書・領収書・見積書 共通スタイル
   
   BLOCK 1: 共通設定・印刷設定・ボタン
   BLOCK 2: 請求書・領収書（container系）
   BLOCK 3: 見積書（getestima）
============================================ */

/* ============================================
   BLOCK 1: 共通設定・印刷設定・ボタン
============================================ */

/* --- 印刷用A4最適化 --- */
@media print {
    @page {
        size: A4;
        margin: 15mm 10mm;
    }
    
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .container,
    .ec-layoutRole__main {
        max-width: 100% !important;
        padding: 0 !important;
        font-size: 11pt !important;
    }
    
    #print-footer,
    #print,
    #edit,
    #mod {
        display: none !important;
    }
    
    table {
        page-break-inside: avoid;
    }
}

/* --- 共通ボタン（緑プライマリ） --- */
#print-footer button#print,
#print input.btn-primary,
#print .btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 180px !important;
    height: 48px !important;
    padding: 0 28px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: linear-gradient(135deg, #23AC38 0%, #1a8a2c 100%) !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

#print-footer button#print:hover,
#print input.btn-primary:hover,
#print .btn-primary:hover {
    background: linear-gradient(135deg, #1a8a2c 0%, #156d23 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(35, 172, 56, 0.3) !important;
}

/* --- 閉じるボタン（グレー枠） --- */
#print-footer button:not(#print) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 120px !important;
    height: 48px !important;
    padding: 0 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #666 !important;
    background: #fff !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

#print-footer button:not(#print):hover {
    border-color: #999 !important;
    color: #333 !important;
}

/* --- 名称変更・適用ボタン --- */
#edit,
#mod {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 100px !important;
    height: 36px !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #23AC38 !important;
    background: #fff !important;
    border: 2px solid #23AC38 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

#edit:hover,
#mod:hover {
    background: #23AC38 !important;
    color: #fff !important;
}

/* --- ボタンエリア --- */
#print-footer {
    display: flex !important;
    justify-content: center !important;
    gap: 16px !important;
    margin-top: 40px !important;
    padding-top: 24px !important;
    border-top: 1px solid #e0e0e0 !important;
}

/* ============================================
   BLOCK 2: 請求書・領収書（container系）
============================================ */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

.container .logo {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.container h1 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 24px 0;
}

.container h2#name {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.container .table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.container .table th,
.container .table td {
    padding: 12px 8px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.container .table th {
    background: #f8f8f8;
    font-weight: 600;
}

/* 領収書の印紙不要ボックス */
.container .inshi {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-align: center;
    line-height: 1.4;
    border: 2px solid #999;
    border-radius: 4px;
}

/* 社印エリア */
.container .stamp {
    position: relative;
    text-align: right;
    font-size: 13px;
    line-height: 1.6;
}

.container .stamp-image {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 60px;
    height: 60px;
    opacity: 0.8;
}

/* ============================================
   BLOCK 3: 見積書（getestima）
============================================ */
body.getestima {
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background: #fff;
}

body.getestima .ec-layoutRole__main {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

/* タイトル */
body.getestima .getestima_title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 8px;
}

body.getestima .getestima_no {
    font-size: 14px;
    font-weight: 400;
    color: #666;
    text-align: right;
}

/* 印刷ボタンエリア */
body.getestima #print {
    text-align: center;
    margin: 24px 0;
}

/* ボックスレイアウト */
body.getestima .box {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid #e0e0e0;
}

body.getestima .box:last-of-type {
    border-bottom: none;
}

body.getestima .box .left {
    flex: 1;
    min-width: 300px;
}

body.getestima .box .right {
    flex: 1;
    min-width: 300px;
}

body.getestima .clear {
    display: none;
}

/* 宛名 */
body.getestima #name {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

body.getestima #sub_name {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

/* 詳細 */
body.getestima #comment {
    font-size: 14px;
    color: #333;
    margin-bottom: 16px;
}

body.getestima #detail .item {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
}

/* 見積日 */
body.getestima .estmate_day {
    font-size: 14px;
    color: #666;
    text-align: right;
    margin-bottom: 16px;
}

/* ロゴ */
body.getestima .getestima_logo {
    text-align: right;
    margin-bottom: 16px;
}

body.getestima .getestima_logo img {
    max-width: 200px;
    height: auto;
}

/* 会社情報 */
body.getestima .info_area {
    font-size: 13px;
    color: #333;
    line-height: 1.6;
}

body.getestima .houjin_info {
    margin: 0;
    line-height: 1.6;
}

/* タイトルバー */
body.getestima .title_bar {
    width: 100%;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    padding: 12px 0;
    border-bottom: 2px solid #23AC38;
    margin-bottom: 16px;
}

/* 商品エリア */
body.getestima .product_area {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

body.getestima .product_area:last-child {
    border-bottom: none;
}

body.getestima .product_name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

body.getestima .classcategory {
    font-size: 12px;
    color: #999;
}

body.getestima .price {
    font-size: 14px;
    color: #333;
    margin-top: 4px;
}

body.getestima .price .small {
    font-size: 12px;
    color: #666;
}

/* 合計エリア */
body.getestima #price_area {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
}

body.getestima #subtotal,
body.getestima #charge,
body.getestima #delivery_total {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

body.getestima .total_amount {
    font-size: 20px;
    font-weight: 700;
    color: #23AC38;
    margin: 16px 0 12px;
    padding-top: 12px;
    border-top: 2px solid #23AC38;
}

body.getestima .total_amount .small {
    font-size: 14px;
    font-weight: 400;
    color: #666;
}

/* 税率表示 */
body.getestima #price_area > div:last-child {
    font-size: 12px;
    color: #666;
}

/* ============================================
   レスポンシブ
============================================ */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .container h1 {
        font-size: 24px;
    }
    
    #print-footer {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    #print-footer button,
    #print-footer button#print {
        width: 100%;
        max-width: 280px;
    }
    
    body.getestima .box {
        flex-direction: column;
    }
    
    body.getestima .box .left,
    body.getestima .box .right {
        min-width: 100%;
    }
    
    body.getestima .getestima_logo {
        text-align: center;
    }
    
    body.getestima #price_area {
        padding: 16px;
    }
}
/* 見積書ロゴ右寄せ */
body.getestima .getestima_logo {
    text-align: right;
    margin-bottom: 16px;
}

body.getestima .getestima_logo img {
    max-width: 200px;
    height: auto;
    display: inline-block;
}

body.getestima .info_area {
    text-align: right;
}

body.getestima .info_left {
    text-align: right;
}

body.getestima .houjinblk {
    text-align: right;
}

/* ============================================
   custom_invoice.css ここまで
============================================ */
