/* ================================================
   Aircraft Specifications – page content styles
   Base resets and design tokens are in global.css
   ================================================ */

/* ── Section inner wrappers (divider lines – matches maintenance/company pattern) ── */
.specs-section-inner {
    width: 100%;
    max-width: 1440px;
}

.specs-search-inner {
    width: 100%;
    max-width: 1440px;
}

/* ── Section titles (matching company.css .profile-title) ── */
.specs-section-title {
    margin-bottom: 2rem;
}

/* ── Search section (white background like other sections) ── */
.specs-search-section {
    background: #fff;
    position: relative;
    z-index: 10;
}

/* ── Search card (light gray card style like the rest of the site) ── */
.specs-search-card {
    padding: 2rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

/* ── Search description text ── */
.specs-search-desc {
    text-align: center;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* ── Search container ── */
.search-container {
    position: relative;
    display: flex;
    align-items: stretch;
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
}

/* ── Search input (transparent / language-selector style) ── */
.search-input {
    flex: 1;
    padding: 0 1rem;
    border: 1px solid rgba(26, 95, 160, 0.3) !important;
    border-right: none !important;
    border-radius: 6px 0 0 6px;
    background: rgba(255, 255, 255, 0.6) !important;
    color: var(--text-dark);
    font-size: 0.95rem;
    min-height: 40px;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
    opacity: 0.85;
}

.search-input::placeholder {
    color: rgba(91, 101, 134, 0.7);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(26, 95, 160, 0.55) !important;
    outline: none;
    opacity: 1;
}

/* ── Search button (same height as input, language-selector style) ── */
.search-button {
    padding: 0 1rem;
    min-height: 40px;
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(26, 95, 160, 0.3) !important;
    border-radius: 0 6px 6px 0;
    color: var(--text-dark);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    opacity: 0.85;
}

.search-button:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    opacity: 1;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 100%;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}

.search-results.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
    display: block;
    color: var(--text-dark);
    cursor: pointer;
}

.search-result-item:hover {
    background: var(--light-bg);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.search-result-type {
    font-size: 0.875rem;
    color: var(--text-dark);
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-dark);
}

/* ── Aircraft Types Section ── */
.aircraft-types-section {
    background: #fff;
}

.section-subtitle {
    text-align: center;
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.aircraft-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.aircraft-type-card {
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: var(--text-dark);
    display: block;
    text-decoration: none;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
}

.aircraft-type-card:hover {
    transform: translateX(-5px) translateY(-5px);
    box-shadow: var(--shadow-lg);
}

a.aircraft-type-card {
    cursor: pointer;
}

.aircraft-type-card.unavailable {
    opacity: 0.7;
    cursor: not-allowed;
}

.aircraft-type-card.unavailable:hover {
    transform: none;
    box-shadow: var(--shadow);
    background: var(--light-bg);
}

.aircraft-type-icon {
    width: 6rem;
    margin: 0 auto 1.25rem;
    display: block;
}

.aircraft-type-icon img {
    width: 100%;
    height: auto;
    display: block;
}

.aircraft-type-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.aircraft-type-card p {
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* ── Features Section ── */
.features-section {
    background: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

/* ── About Section ── */
.about-section {
    background: #fff;
}

/* ── About card ── */
.specs-about-card {
    padding: 2rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.specs-about-card p {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ── Summary cards (G550 summary tab top stats) ── */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    padding: 1.5rem;
    text-align: center;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.summary-card:hover,
.specs-about-card:hover {
    transform: translateX(-5px) translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.summary-card h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.06rem;
}

.summary-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0.25rem 0;
    line-height: 1.2;
}

/* ── Summary description box ── */
.summary-description {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin-top: 1.5rem;
}

/* ── Info grid & cards (performance/design tabs) ── */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.info-card {
    padding: 1.5rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateX(-5px) translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item-label {
    color: var(--text-dark);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.info-item-value {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.875rem;
    text-align: right;
}

/* ── Cost tables ── */
.cost-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.cost-table {
    padding: 1.5rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cost-table:hover {
    transform: translateX(-5px) translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.cost-table h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    gap: 1rem;
}

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

/* Remove thin line immediately before a total row */
.cost-row:has(+ .cost-row.total) {
    border-bottom: none;
}

.cost-row.total {
    font-weight: 700;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    border-bottom: none;
    padding-top: 0.75rem;
    margin-top: 0.25rem;
}

/* Thin separator after 年間総予算 (total followed by more rows) */
.cost-row.total:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Bold sub-total rows (月間総予算 and 時間あたりコスト) */
.cost-row.sub-total .cost-label {
    font-weight: 700;
    color: var(--text-dark);
}

.cost-row.sub-total .cost-value {
    font-weight: 700;
}

.cost-label {
    color: var(--text-dark);
    font-size: 0.875rem;
}

.cost-row.total .cost-label {
    color: var(--text-dark);
}

.cost-value {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.875rem;
}

.cost-row.total .cost-value {
    color: var(--text-dark);
    font-size: 1rem;
}

/* ── Spec panels (chart/input containers in G550) ── */
.spec-panel {
    padding: 1.5rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.spec-chart-panel {
    padding: 2rem;
    border-radius: 12px;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
}


/* ── Responsive ── */

/* 13-inch (≤ 1280px) */
@media (max-width: 1280px) {
    .specs-search-card { padding: 1.75rem; }
    .aircraft-types-grid { gap: 1.5rem; }
    .features-grid { gap: 1.5rem; }
    .summary-grid { gap: 1.25rem; }
    .cost-section { gap: 1.25rem; }
}

/* iPad (≤ 1024px) */
@media (max-width: 1024px) {
    .specs-section-title { font-size: 2.75rem; }
    .aircraft-types-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .features-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .cost-section { grid-template-columns: 1fr; }
    .cost-charts-grid { grid-template-columns: 1fr; }
    .cost-config-grid { grid-template-columns: repeat(2, 1fr); }
    .specs-search-card { padding: 1.5rem; }
}

/* Mobile (≤ 767px) */
@media (max-width: 767px) {
    .specs-section-title { font-size: 2rem; }
    .section-subtitle { font-size: 1rem; margin-bottom: 2rem; }
    .aircraft-types-grid { grid-template-columns: 1fr; gap: 1rem; }
    .aircraft-type-card { padding: 1.25rem; }
    .aircraft-type-card:hover { transform: none; }
    .aircraft-type-icon { width: 4rem; }
    .features-grid { grid-template-columns: 1fr; gap: 1rem; }
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .summary-card .value { font-size: 1.5rem; }
    .info-grid { grid-template-columns: 1fr; }
    .info-item { flex-direction: column; gap: 0.25rem; }
    .info-item-value { text-align: left; }
    .cost-section { grid-template-columns: 1fr; }
    .cost-config-grid { grid-template-columns: 1fr; }
    .search-container { max-width: 100%; }
    .specs-search-card { padding: 1.25rem; }
}

