/* css/gcp/cloud_sql_custom.css */

/* Overall container and sections for a clean layout */
.calculator-container {
    padding: 20px;
    background-color: #ffffff; /* White background */
    border-radius: 8px; /* Slightly rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* Subtle shadow */
}

/* Common section styling */
.application-type-section,
.instance-family-section, /* As per user's specified class name */
.instance-config-section,
.additional-options-section,
.total-cost-section,
.notes-section {
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f8f9fa; /* Light gray background for sections */
    border-radius: 8px;
    border: 1px solid #e9ecef; /* Light border */
}

/* Headings */
h2, h3 {
    color: #3c4043; /* Google gray for text */
    font-family: 'Roboto', sans-serif; /* Prefer Roboto, fall back to generic sans-serif */
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0; /* Subtle separator */
    padding-bottom: 10px;
}

/* Form controls (select, input) */
.form-select,
.form-control {
    border: 1px solid #dadce0; /* Google input border color */
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 1rem;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-select:focus,
.form-control:focus {
    border-color: #4285f4; /* Google blue on focus */
    box-shadow: 0 0 0 0.25rem rgba(66, 133, 244, 0.25); /* Subtle blue glow */
}

/* Checkboxes (DB Engine, HA, Backup, IP) */
.form-check-input {
    border: 1px solid #dadce0;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.form-check-input:checked {
    background-color: #4285f4; /* Google blue */
    border-color: #4285f4;
}

.form-check-label {
    color: #5f6368; /* Slightly darker gray for labels */
}

/* Card styling for individual instances */
.instance-config.card {
    border: 1px solid #e0e0e0; /* Lighter border for individual cards */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03); /* Lighter shadow */
    margin-top: 15px;
}

.instance-config .card-header {
    background-color: #e8f0fe; /* Light blue header */
    color: #1a73e8; /* Google blue text */
    padding: 15px 20px;
    border-bottom: 1px solid #d2e3fc;
    border-radius: 8px 8px 0 0; /* Match parent border-radius */
}

/* Buttons */
.btn-primary {
    background-color: #4285f4; /* Google blue */
    border-color: #4285f4;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.btn-primary:hover {
    background-color: #3367d6; /* Darker blue on hover */
    border-color: #3367d6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Slight lift */
}

.btn-danger {
    background-color: #ea4335; /* Google red */
    border-color: #ea4335;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.btn-danger:hover {
    background-color: #d93025; /* Darker red on hover */
    border-color: #d93025;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Slight lift */
}

/* Cost Breakdown Table */
.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.breakdown-table th,
.breakdown-table td {
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
    text-align: left;
}

.breakdown-table thead th {
    background-color: #f2f2f2; /* Light gray header */
    color: #5f6368;
    font-weight: bold;
}

.breakdown-table tbody tr:nth-child(even) {
    background-color: #f7f7f7; /* Zebr-striping for readability */
}

/* Total Cost Section */
.total-cost-section {
    text-align: center; /* 合計金額を中央揃えに */
    padding: 30px 20px; /* セクションのパディングを増やして目立たせる */
    background-color: #e8f0fe; /* 明るい青系の背景色で強調 */
    border: 1px solid #d2e3fc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* 控えめな影 */
    margin-top: 30px; /* 上部に少し余白を追加 */
}

.total-cost-section h2 {
    color: #1a73e8; /* Googleブルーを基調とした色 */
    font-size: 1.5rem; /* 見出しのフォントサイズを調整し、金額をより目立たせる */
    font-weight: 500; /* 中程度の太さ */
    margin-bottom: 20px;
    border-bottom: none; /* 下線を削除 */
    padding-bottom: 0;
}

.total-cost {
    display: flex;
    flex-direction: column; /* 円とドルの表示を縦に積み重ねる */
    align-items: center; /* アイテムを中央揃えに */
}

.total-cost .cost-amount { /* 日本円の金額（id="total_cost_jpy"）をターゲット */
    font-size: 3rem; /* フォントサイズを大きくして、最も目立たせる */
    font-weight: bold;
    color: #1a73e8; /* 強いGoogleブルーで強調 */
    line-height: 1; /* 行の高さを詰めて、コンパクトに */
    margin-bottom: 5px; /* 日本円とドルの間に少し余白 */
}

.total-cost .usd-estimate {
    font-size: 1.2rem; /* ドル換算は視認性を保ちつつ、日本円より控えめに */
    color: #5f6368; /* 落ち着いたグレー */
}

.total-cost .usd-estimate span { /* ドルの金額自体は太字に */
    font-weight: bold;
}
/* Notes Section */
.notes-section {
    font-size: 0.9rem;
    color: #5f6368;
}

.notes-section strong {
    color: #3c4043;
}

/* Specific styling for the USD rate input wrapper */
.usd_rate_input_wrapper {
    padding: 15px 20px;
    background-color: #fff; /* White background */
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.usd_rate_input_wrapper label {
    color: #3c4043;
    font-weight: bold;
}
.usd_rate_input_wrapper .form-control {
    width: auto; /* Allow input to size naturally */
    display: inline-block; /* Keep it next to label if possible */
    margin-left: 10px;
}

/* Specific styling for the USD rate error message, targeting existing ID */
#usd-rate-error-message {
    color: #d93025; /* Google red for errors */
    font-size: 0.85rem;
    margin-top: 5px;
    display: block; /* Ensure it appears on its own line */
}