/**
 * Ongyul 내 정보 페이지 스타일
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #191f28;
    background-color: #ffffff;
}

/* 앱 환경에서만 하단 네비게이션 공간 확보 */
body.lb-platform-android,
body.lb-platform-ios {
    padding-bottom: 72px;
}

/* 헤더 */
.header {
    position: sticky;
    top: 0;
    background-color: #fff;
    border-bottom: 1px solid #E5E8EB;
    padding: 16px 20px;
    z-index: 10;
}

.header__content {
    max-width: 640px;
    margin: 0 auto;
}

.header__title {
    font-size: 20px;
    font-weight: 700;
    color: #191f28;
}

/* 컨테이너 */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-required-state {
    min-height: 360px;
    padding: 64px 20px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.auth-required-state__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #F2F4F6;
    color: #8B95A1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.auth-required-state__icon svg {
    width: 34px;
    height: 34px;
}

.auth-required-state__title {
    font-size: 20px;
    font-weight: 700;
    color: #191F28;
    margin-bottom: 8px;
}

.auth-required-state__desc {
    font-size: 15px;
    color: #6B7684;
    margin-bottom: 24px;
    word-break: keep-all;
}

.auth-required-state__button {
    min-width: 160px;
    height: 48px;
    padding: 0 22px;
    border: none;
    border-radius: 8px;
    background: #3182F6;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

/* =========================================
   프로필 헤더
   ========================================= */
.profile-header {
    text-align: center;
    padding: 24px 0;
}

.profile-header__name {
    font-size: 18px;
    font-weight: 700;
    color: #191f28;
    margin: 8px 0 2px;
}

.profile-header__id {
    font-size: 14px;
    color: #8b95a1;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background-color: #F2F4F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.profile-avatar:hover {
    opacity: 0.85;
}

.profile-avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar__icon {
    width: 48px;
    height: 48px;
    color: #B0B8C1;
}

/* =========================================
   메뉴 리스트 (아코디언)
   ========================================= */
.mypage-menu {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #F2F4F6;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.menu-item {
    background: #fff;
}

.menu-item__header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #191f28;
    text-align: left;
}

.menu-item__header svg:first-child {
    color: #6B7280;
    flex-shrink: 0;
}

.menu-item__header span {
    flex: 1;
}

.menu-item__arrow {
    color: #AEB5BC;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.menu-item__content {
    padding: 0 20px 20px;
}

/* =========================================
   서브 섹션 (비밀번호 변경)
   ========================================= */
.sub-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #F2F4F6;
}

.sub-section__header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #4E5968;
    font-family: inherit;
    padding: 0;
}

.sub-section__arrow {
    color: #AEB5BC;
    transition: transform 0.2s;
}

#passwordSection {
    padding-top: 16px;
}

/* =========================================
   폼
   ========================================= */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 15px;
    font-weight: 400;
    color: #4E5968;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 16px;
    font-family: inherit;
    color: #191f28;
    background-color: #fff;
    border: 1px solid #E5E8EB;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

.form-input::placeholder {
    color: #B0B8C1;
}

.form-input:focus {
    border-color: #3182F6;
}

.form-input--readonly {
    background-color: #F2F4F6;
    color: #6B7684;
    cursor: not-allowed;
}

/* =========================================
   버튼
   ========================================= */
.btn-primary {
    width: 100%;
    height: 48px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background-color: #3182F6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #1B64DA;
}

.btn-primary:active {
    background-color: #1957C2;
}

.btn-logout {
    width: 100%;
    padding: 14px;
    background: #F7F8FA;
    border: 1px solid #E5E8EB;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #4E5968;
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 16px;
}

.btn-logout:hover {
    background-color: #E8EBED;
}

/* =========================================
   고객 지원
   ========================================= */
.mypage-support-section {
    margin-bottom: 16px;
}

.mypage-support-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid #D6E4FF;
    border-radius: 12px;
    background: #F7FAFF;
    color: #191f28;
    text-decoration: none;
}

.mypage-support-card:hover {
    border-color: #3182F6;
    background: #EFF6FF;
}

.mypage-support-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #E8F3FF;
    color: #3182F6;
    flex-shrink: 0;
}

.mypage-support-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.mypage-support-card__body strong {
    color: #191f28;
    font-size: 16px;
    font-weight: 700;
}

.mypage-support-card__body em {
    color: #6B7684;
    font-size: 13px;
    font-style: normal;
    line-height: 1.4;
}

.mypage-support-card__arrow {
    color: #AEB5BC;
    flex-shrink: 0;
}

/* =========================================
   약관 및 업체 정보 메뉴
   ========================================= */
.mypage-legal-menu {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #F2F4F6;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.mypage-legal-menu__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 20px;
    background: #fff;
    color: #191f28;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.mypage-legal-menu__link svg {
    color: #AEB5BC;
    flex-shrink: 0;
}

.mypage-legal-menu__link:hover {
    background-color: #F9FAFB;
}

/* =========================================
   내정보 설정 (회원탈퇴)
   ========================================= */
.settings-footer {
    text-align: center;
    padding: 8px 0 20px;
}

.settings-footer__link {
    background: none;
    border: none;
    font-size: 13px;
    color: #AEB5BC;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
}

.settings-footer__desc {
    font-size: 12px;
    color: #AEB5BC;
    margin: 12px 0 8px;
}

.btn-withdraw-small {
    background: none;
    border: none;
    font-size: 12px;
    color: #EF4444;
    cursor: pointer;
    font-family: inherit;
}

/* =========================================
   결제 카드 관리
   ========================================= */
.card-list {
    margin-bottom: 12px;
}

.card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #F2F4F6;
}

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

.card-item__icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F2F4F6;
    border-radius: 10px;
    color: #6B7684;
    flex-shrink: 0;
}

.card-item__icon svg {
    width: 32px;
    height: 32px;
}

.card-item__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.card-item__company {
    font-size: 16px;
    font-weight: 500;
    color: #191f28;
}

.card-item__number {
    font-size: 14px;
    color: #8B95A1;
    font-variant-numeric: tabular-nums;
}

.card-item__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.card-item__status {
    font-size: 14px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
}

.card-item__status--active {
    background-color: #E8F5E9;
    color: #34C759;
}

.card-item__status--inactive {
    background-color: #F2F4F6;
    color: #8B95A1;
}

.card-item__delete {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #B0B8C1;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.card-item__delete:hover {
    background-color: #FFF5F5;
    color: #FF4545;
}

.btn-add-card {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: #3182F6;
    background-color: #F0F6FF;
    border: 1px dashed #3182F6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-card:hover {
    background-color: #E5EFFF;
}

/* =========================================
   자리 알림 신청 목록
   ========================================= */
.notify-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #F2F4F6;
}

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

.notify-item__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notify-item__product {
    font-size: 15px;
    font-weight: 500;
    color: #191f28;
}

.notify-item__branch {
    font-size: 14px;
    color: #8B95A1;
}

.notify-item__delete {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #B0B8C1;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.notify-item__delete:hover {
    background-color: #FFF5F5;
    color: #FF4545;
}

/* =========================================
   공통
   ========================================= */
.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #191f28;
    margin-bottom: 4px;
}

.section-desc {
    font-size: 16px;
    color: #6B7684;
    margin-bottom: 12px;
}

.purchase-profile-desc {
    margin-bottom: 18px;
    line-height: 1.55;
}

.vehicle-form-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.vehicle-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
}

.vehicle-form-row__input {
    min-width: 0;
}

.vehicle-primary-check,
.privacy-once-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4E5968;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.privacy-once-check {
    margin: 4px 0 16px;
    white-space: normal;
}

.btn-add-vehicle,
.vehicle-remove-btn {
    min-height: 38px;
    border: 1px solid #DDE4EE;
    border-radius: 10px;
    background: #fff;
    color: #3182F6;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.btn-add-vehicle {
    width: 100%;
}

.vehicle-remove-btn {
    padding: 0 10px;
    color: #6B7684;
}

/* =========================================
   업체 정보 섹션 (앱 전용)
   ========================================= */
.company-info-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
}

.company-info-section .section-title {
    margin-bottom: 12px;
}

.company-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f2f4f6;
    font-size: 14px;
}

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

.company-info-label {
    color: #8b95a1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.company-info-label svg {
    width: 14px;
    height: 14px;
}

.company-info-value {
    color: #191f28;
    text-align: right;
    word-break: break-all;
}

.company-phone {
    color: #3182F6;
    text-decoration: none;
}

/* =========================================
   PC(웹) 레이아웃 조정
   ========================================= */
body.lb-platform-web .header {
    display: none !important;
}

body.lb-platform-web .container {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 40px 60px;
}

/* 웹에서는 업체 정보 섹션 숨김 (푸터에 표시됨). 앱은 아래 규칙으로 다시 표시 */
body.lb-platform-web .company-info-section {
    display: none;
}

/* 앱에서는 업체 정보 섹션 표시 (lb-platform-web 규칙 override) */
body.lb-platform-android .company-info-section,
body.lb-platform-ios .company-info-section {
    display: block;
}

/* =========================================
   반응형: ~1024px (태블릿)
   ========================================= */
@media (max-width: 1024px) {
    body.lb-platform-web .container {
        max-width: 100%;
        padding: 24px 24px 60px;
    }

    .container {
        max-width: 100%;
    }
}

/* =========================================
   반응형: ~768px (모바일 대형)
   ========================================= */
@media (max-width: 768px) {
    body.lb-platform-web .container {
        padding: 16px 16px 60px;
    }

    .container {
        padding: 16px;
        gap: 12px;
    }

    .menu-item__header {
        padding: 14px 16px;
    }

    .menu-item__content {
        padding: 0 16px 16px;
    }

    .profile-avatar {
        width: 72px;
        height: 72px;
    }

    .profile-avatar__icon {
        width: 42px;
        height: 42px;
    }

    .form-group label {
        font-size: 14px;
    }

    .form-input {
        height: 44px;
        font-size: 15px;
    }

    .btn-primary,
    .btn-logout {
        height: 44px;
        font-size: 15px;
    }

    .card-item__icon {
        width: 52px;
        height: 52px;
    }

    .card-item__icon svg {
        width: 28px;
        height: 28px;
    }
}

/* =========================================
   반응형: ~480px (모바일 소형)
   ========================================= */
@media (max-width: 480px) {
    body.lb-platform-web .container {
        padding: 14px 14px 60px;
    }

    .container {
        padding: 14px;
        gap: 10px;
    }

    .mypage-menu {
        border-radius: 10px;
    }

    .mypage-legal-menu {
        border-radius: 10px;
    }

    .menu-item__header {
        padding: 12px 14px;
        font-size: 14px;
    }

    .mypage-legal-menu__link {
        padding: 12px 14px;
        font-size: 14px;
    }

    .menu-item__content {
        padding: 0 14px 14px;
    }

    .profile-avatar {
        width: 64px;
        height: 64px;
    }

    .profile-avatar__icon {
        width: 36px;
        height: 36px;
    }

    .header__title {
        font-size: 18px;
    }

    .form-group label {
        font-size: 14px;
    }

    .form-input {
        height: 42px;
        font-size: 14px;
        padding: 0 14px;
    }

    .btn-primary,
    .btn-logout {
        height: 42px;
        font-size: 14px;
    }

    .btn-add-card {
        height: 40px;
        font-size: 14px;
    }

    .card-item {
        padding: 12px 0;
        gap: 10px;
    }

    .card-item__icon {
        width: 48px;
        height: 48px;
        border-radius: 8px;
    }

    .card-item__icon svg {
        width: 24px;
        height: 24px;
    }

    .card-item__company {
        font-size: 15px;
    }

    .notify-item__product {
        font-size: 14px;
    }

    .company-info-row {
        font-size: 14px;
    }

    .company-info-section {
        padding: 16px;
    }
}

/* =========================================
   알림 설정
   ========================================= */
.noti-settings {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.noti-settings__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f2f4f6;
}

.noti-settings__item:last-child {
    border-bottom: none;
}

.noti-settings__label {
    font-size: 15px;
    color: #191f28;
    font-weight: 500;
}

/* 토글 스위치 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #D1D6DB;
    border-radius: 14px;
    transition: background-color 0.2s;
}

.toggle-switch__slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-switch__slider {
    background-color: #3182F6;
}

.toggle-switch input:checked + .toggle-switch__slider::before {
    transform: translateX(20px);
}

@media (max-width: 480px) {
    .vehicle-form-row {
        grid-template-columns: 1fr;
    }

    .vehicle-primary-check,
    .vehicle-remove-btn {
        justify-self: flex-start;
    }
}
