/* car-sateihojo.css - Scoped under .car-app to prevent style leaks */

.car-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #334155;
    max-width: 960px;
    margin: 10px auto 30px auto;
    padding: 0 12px;
}

.car-app * {
    box-sizing: border-box;
}

/* Header */
.car-app .car-header {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    color: #ffffff;
    padding: 24px 28px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(13, 148, 136, 0.25);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.car-app .car-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.car-app .car-header-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 4px 0 0 0;
}

/* Grid Layout */
.car-app .car-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .car-app .car-grid {
        grid-template-columns: 1fr;
    }
}

/* Card */
.car-app .car-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.car-app .car-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
}

/* Section Title inside card */
.car-app .car-sec-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Input Display */
.car-app .car-display-wrapper {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 16px;
    transition: border-color 0.2s;
}

.car-app .car-display-wrapper:focus-within {
    border-color: #0d9488;
}

.car-app .car-input-res1 {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
    width: 100%;
    outline: none;
    padding: 0;
}

.car-app .car-input-unit {
    font-size: 1.1rem;
    font-weight: 600;
    color: #64748b;
    margin-left: 8px;
}

/* Keypad Button Grid */
.car-app .car-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.car-app .car-btn {
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f766e;
    background-color: #f0fdfa;
    border: 1px solid #ccfbf1;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    outline: none;
}

.car-app .car-btn:hover {
    background-color: #e6fffa;
    border-color: #99f6e4;
    transform: translateY(-1px);
}

.car-app .car-btn:active {
    background-color: #ccfbf1;
    transform: translateY(1px);
}

/* Clear Button */
.car-app .car-btn-clear {
    color: #be123c;
    background-color: #fff1f2;
    border-color: #ffe4e6;
}

.car-app .car-btn-clear:hover {
    background-color: #ffe4e6;
    border-color: #fecdd3;
}

.car-app .car-btn-clear:active {
    background-color: #fecdd3;
}

/* Large Wide Button (+5) */
.car-app .car-btn-wide {
    grid-column: span 3;
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}

.car-app .car-btn-wide:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

/* Select Control */
.car-app .car-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.car-app .car-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background-color: #ffffff;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

.car-app .car-select:focus {
    border-color: #0d9488;
}

/* Formula & Result Section */
.car-app .car-result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    text-align: center;
}

.car-app .car-result-title {
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
}

.car-app .car-result-badge {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    color: #ffffff;
    padding: 20px 36px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(13, 148, 136, 0.2);
    display: flex;
    align-items: baseline;
    gap: 8px;
    animation: pulse-subtle 3s infinite ease-in-out;
}

.car-app .car-result-num {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

.car-app .car-result-unit {
    font-size: 1.25rem;
    font-weight: 700;
    opacity: 0.9;
}

/* Formula flow */
.car-app .car-flow {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.car-app .car-flow-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.car-app .car-flow-label {
    color: #64748b;
    font-weight: 500;
}

.car-app .car-flow-value {
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 4px;
}

.car-app .car-flow-value input {
    border: none;
    background: transparent;
    text-align: right;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    width: 60px;
    outline: none;
    pointer-events: none; /* read-only presentation */
}

.car-app .car-flow-value-prefix {
    color: #94a3b8;
    font-weight: 500;
}

.car-app .car-flow-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

@keyframes pulse-subtle {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}
