/* サッパリーズ剪定見積システム（高度版）スタイルシート */

.sapparies-advanced-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', sans-serif;
}

/* ヘッダー */
.estimate-header {
    background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.estimate-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: bold;
}

.estimate-header .subtitle {
    margin: 0;
    font-size: 1rem;
    opacity: 0.95;
}

/* セクション */
.estimate-form-section,
.estimate-list-section,
.disclaimer-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.estimate-form-section h3,
.estimate-list-section h3,
.disclaimer-section h3 {
    color: #2E7D32;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #43A047;
}

.section-title {
    color: #43A047;
    font-size: 1.25rem;
    margin: 2rem 0 1rem 0;
    padding-left: 0.5rem;
    border-left: 4px solid #66BB6A;
}

/* フォーム要素 */
.form-row {
    margin-bottom: 1.5rem;
}

.form-row label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.required {
    color: #E53935;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #43A047;
    box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.1);
}

/* 項目情報グリッド */
.item-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-card {
    background: #E8F5E9;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #43A047;
}

.info-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.info-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2E7D32;
}

.info-value.small {
    font-size: 1rem;
}

/* 係数選択 */
.coefficient-select {
    margin-bottom: 0.5rem;
}

.coefficient-display {
    font-size: 0.875rem;
    color: #43A047;
    font-weight: 600;
    padding: 0.5rem;
    background: #F1F8E9;
    border-radius: 4px;
    text-align: right;
}

/* 計算表示 */
.calculation-display {
    background: linear-gradient(135deg, #FFF9C4 0%, #FFF59D 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 2px solid #FBC02D;
}

.calculation-display h4 {
    color: #F57C00;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.formula {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.8;
}

.formula span {
    color: #1976D2;
    font-weight: 600;
}

.formula strong {
    color: #E65100;
    font-size: 1.125rem;
}

.amount-section {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.125rem;
    line-height: 1.8;
}

.amount-section span {
    color: #1976D2;
    font-weight: 600;
}

.total-amount {
    color: #E65100;
    font-size: 1.25rem;
}

/* ボタン */
.btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.4);
}

.btn-add {
    width: 100%;
    font-size: 1.125rem;
}

.btn-success {
    background: linear-gradient(135deg, #1976D2 0%, #42A5F5 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1565C0 0%, #1976D2 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4);
}

.btn-secondary {
    background: #757575;
    color: white;
}

.btn-secondary:hover {
    background: #616161;
}

.btn-delete {
    background: #E53935;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-delete:hover {
    background: #C62828;
}

/* テーブル */
.estimate-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.estimate-table thead {
    background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
    color: white;
}

.estimate-table th {
    padding: 0.875rem 0.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
}

.estimate-table td {
    padding: 0.875rem 0.5rem;
    border-bottom: 1px solid #E0E0E0;
}

.estimate-table tbody tr:hover {
    background: #F5F5F5;
}

.empty-row td {
    text-align: center;
    padding: 3rem !important;
    color: #999;
    font-size: 1.125rem;
}

.text-center {
    text-align: center;
}

/* サマリーカード */
.summary-card {
    background: #E8F5E9;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 6px solid #43A047;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #C8E6C9;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2E7D32;
}

.total-row {
    background: linear-gradient(135deg, #FFF9C4 0%, #FFF59D 100%);
    margin: 1rem -2rem -2rem -2rem;
    padding: 1.5rem 2rem !important;
    border-radius: 0 0 12px 12px;
    border-bottom: none !important;
}

.total-row .summary-value {
    font-size: 2rem;
    color: #E65100;
}

/* アクションボタン */
.action-buttons {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.btn-download,
.btn-clear {
    width: 100%;
}

/* 注意事項 */
.disclaimer-section {
    background: #FFF9C4;
    border-left: 6px solid #FBC02D;
}

.disclaimer-content {
    color: #333;
    line-height: 1.8;
}

.disclaimer-content h4 {
    color: #E65100;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.disclaimer-title {
    font-size: 1.125rem;
    color: #E65100;
    margin-bottom: 1rem;
}

.disclaimer-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.disclaimer-content li {
    margin-bottom: 0.5rem;
}

.contact-info {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.note {
    color: #666;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* メッセージエリア */
.message-area {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.message-success {
    background: #43A047;
    color: white;
}

.message-error {
    background: #E53935;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .estimate-table {
        font-size: 0.8rem;
    }
    
    .estimate-table th,
    .estimate-table td {
        padding: 0.5rem 0.25rem;
    }
}

@media (max-width: 768px) {
    .sapparies-advanced-container {
        padding: 1rem;
    }

    .estimate-header h2 {
        font-size: 1.5rem;
    }

    .item-info-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .estimate-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .message-area {
        left: 1rem;
        right: 1rem;
        top: 1rem;
    }
}

/* ---- 説明文スタイル ---- */
.sapparies-advanced-container .field-description {
    font-size: 0.82rem;
    color: #555;
    background: #f8fdf4;
    border-left: 3px solid #5a9e5a;
    padding: 8px 12px;
    margin: 4px 0 10px 0;
    border-radius: 0 4px 4px 0;
    line-height: 1.7;
}

/* ---- 金額のみ表示（計算式なし） ---- */
.sapparies-advanced-container .amount-result-display {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 14px 20px;
    margin: 16px 0;
    text-align: right;
}

.sapparies-advanced-container .amount-result-display .total-amount {
    font-size: 1.4rem;
    color: #1b5e20;
}

/* ---- 免責事項の簡略表示 ---- */
.sapparies-advanced-container .disclaimer-section {
    margin-top: 16px;
}

.sapparies-advanced-container .disclaimer-note {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    padding: 10px;
    border-top: 1px solid #ddd;
}
