/* 결제 페이지 (pay) 전용 스타일 */

/* 메인 컨테이너 */
.pay-container {
    width: 100%;
    padding: 0;
}

/* 요금제 박스 래퍼 */
.pay-plans-wrapper {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 2rem;
}

/* 요금제 박스 */
.pay-plan-box {
    background: var(--surface-color);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* 요금제 헤더 */
.pay-plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
}

/* 요금제 이름 */
.pay-plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    flex-shrink: 0;
}

/* 드롭다운 셀렉트 */
.pay-dropdown-select {
    min-width: 80px;
    max-width: 140px;
    padding: 0.5rem 1.25rem 0.5rem 0.625rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--surface-color);
    color: var(--gray-800);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.375rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    box-sizing: border-box;
}

/* 요금제 설명 */
.pay-plan-description {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
}

/* 요금제 가격 */
.pay-plan-price {
    margin-top: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    text-align: left;
}

.pay-price-amount {
    color: var(--gray-900);
}

.pay-price-period {
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 400;
}

.pay-price-vat {
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 400;
}

/* 할인 정보 컨테이너 */
.pay-discount-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    margin-top: 0.375rem;
    margin-bottom: 0.25rem;
}

/* 기존 가격 (취소선) */
.pay-original-price {
    font-size: 0.875rem;
    color: var(--gray-500);
    text-decoration: line-through;
    font-weight: 500;
}

/* 할인 뱃지 */
.pay-discount-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 할인 정보가 없을 때 숨김 */
.pay-discount-info.hidden {
    display: none;
}

/* 3개월 이상 선택 시 모든 플랜에 동일한 여백 적용 */
.pay-plan-box.has-discount-spacing .pay-discount-info.hidden {
    display: flex;
    visibility: hidden;
    height: 27.2px; /* 실제 할인 정보 높이와 정확히 동일하게 설정 */
    margin-top: 0.375rem;
    margin-bottom: 0.25rem;
}

/* 결제하기 버튼 */
.pay-plan-button {
    width: 100%;
    margin-top: 1rem;
    padding: 0.875rem 1.5rem;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    letter-spacing: -0.01em;
    box-shadow: var(--shadow-sm);
}

.pay-plan-button:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    box-shadow: var(--shadow-md);
}

.pay-plan-button:active {
    box-shadow: var(--shadow-sm);
}

.pay-dropdown-select:hover {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%231e40af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

.pay-dropdown-select:focus {
    outline: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%231e40af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

/* 기본 미디어 쿼리 - 1200px */
@media (max-width: 1200px) {
    .pay-container {
        width: 100%;
        padding: 0;
    }
    
    .pay-plan-box {
        padding: 1rem 1rem;
    }
    
    .pay-plan-name {
        font-size: 1.125rem;
    }
    
    .pay-dropdown-select {
        min-width: 75px;
        max-width: 120px;
        padding: 0.5rem 1rem 0.5rem 0.5rem;
        box-sizing: border-box;
    }
    
    .pay-plan-description {
        margin-top: 0.675rem;
        font-size: 0.8125rem;
        line-height: 1.4;
        white-space: nowrap;
        overflow: hidden;
    }
    
    .pay-plan-price {
        margin-top: 0.4375rem;
        font-size: 1rem;
        font-weight: 700;
        text-align: left;
    }
    
    .pay-price-period {
        font-size: 0.8125rem;
    }
    
    .pay-price-vat {
        font-size: 0.8125rem;
    }
    
    .pay-plan-button {
        margin-top: 0.875rem;
        padding: 0.8125rem 1.25rem;
        font-size: 0.875rem;
        font-weight: 600;
    }
    
    /* 할인 정보 - 1200px */
    .pay-discount-info {
        gap: 0.625rem;
        margin-top: 0.3125rem;
        margin-bottom: 0.1875rem;
    }
    
    .pay-original-price {
        font-size: 0.8125rem;
    }
    
    .pay-discount-badge {
        padding: 0.1875rem 0.4375rem;
        font-size: 0.6875rem;
    }
    
    /* 1200px에서 동적 여백 */
    .pay-plan-box.has-discount-spacing .pay-discount-info.hidden {
        display: flex;
        visibility: hidden;
        height: 23.6px; /* 실제 할인 정보 높이와 동일하게 설정 */
        margin-top: 0.3125rem;
        margin-bottom: 0.1875rem;
    }
}

/* 900px 브레이크포인트 */
@media (max-width: 900px) {
    .pay-container {
        padding: 0;
    }
    
    .pay-plans-wrapper {
        gap: 0.875rem;
    }
    
    .pay-plan-box {
        padding: 0.875rem 0.875rem;
    }
    
    .pay-plan-header {
        gap: 0.75rem;
    }
    
    .pay-plan-name {
        font-size: 1rem;
    }
    
    .pay-dropdown-select {
        min-width: 70px;
        max-width: 105px;
        font-size: 0.8125rem;
        padding: 0.4375rem 0.875rem 0.4375rem 0.4375rem;
        box-sizing: border-box;
    }
    
    .pay-plan-description {
        margin-top: 0.625rem;
        font-size: 0.75rem;
        line-height: 1.35;
        white-space: nowrap;
        overflow: hidden;
    }
    
    .pay-plan-price {
        margin-top: 0.375rem;
        font-size: 0.9375rem;
        font-weight: 700;
        text-align: left;
    }
    
    .pay-price-period {
        font-size: 0.75rem;
    }
    
    .pay-price-vat {
        font-size: 0.75rem;
    }
    
    .pay-plan-button {
        margin-top: 0.75rem;
        padding: 0.75rem 1.125rem;
        font-size: 0.8125rem;
        font-weight: 600;
    }
    
    /* 할인 정보 - 900px */
    .pay-discount-info {
        gap: 0.5rem;
        margin-top: 0.25rem;
        margin-bottom: 0.125rem;
    }
    
    .pay-original-price {
        font-size: 0.75rem;
    }
    
    .pay-discount-badge {
        padding: 0.125rem 0.375rem;
        font-size: 0.625rem;
    }
    
    /* 900px에서 동적 여백 */
    .pay-plan-box.has-discount-spacing .pay-discount-info.hidden {
        display: flex;
        visibility: hidden;
        height: 1.25rem; /* 실제 할인 정보 높이와 동일하게 설정 */
        margin-top: 0.25rem;
        margin-bottom: 0.125rem;
    }
}

/* 768px 브레이크포인트 */
@media (max-width: 768px) {
    .pay-container {
        padding: 0;
    }
    
    .pay-plans-wrapper {
        flex-direction: column;
        gap: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .pay-plan-box {
        padding: 0.875rem 0.875rem;
    }
    
    .pay-plan-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .pay-plan-name {
        font-size: 1rem;
    }
    
    .pay-dropdown-select {
        min-width: 70px;
        max-width: 105px;
        font-size: 0.8125rem;
        padding: 0.4375rem 0.875rem 0.4375rem 0.4375rem;
        box-sizing: border-box;
    }
    
    .pay-plan-description {
        margin-top: 0.625rem;
        font-size: 0.75rem;
        line-height: 1.35;
        white-space: nowrap;
        overflow: hidden;
    }
    
    .pay-plan-price {
        margin-top: 0.375rem;
        font-size: 0.9375rem;
        font-weight: 700;
        text-align: left;
    }
    
    .pay-price-period {
        font-size: 0.75rem;
    }
    
    .pay-price-vat {
        font-size: 0.75rem;
    }
    
    .pay-plan-button {
        margin-top: 0.75rem;
        padding: 0.75rem 1.125rem;
        font-size: 0.8125rem;
        font-weight: 600;
    }
    
    /* 할인 정보 - 768px */
    .pay-discount-info {
        gap: 0.5rem;
        margin-top: 0.25rem;
        margin-bottom: 0.125rem;
    }
    
    .pay-original-price {
        font-size: 0.75rem;
    }
    
    .pay-discount-badge {
        padding: 0.125rem 0.375rem;
        font-size: 0.625rem;
    }
    
    /* 768px에서는 동적 여백 비활성화 */
    .pay-plan-box.has-discount-spacing .pay-discount-info.hidden {
        display: none;
        visibility: visible;
        height: auto;
    }
}

/* 480px 브레이크포인트 */
@media (max-width: 480px) {
    .pay-container {
        padding: 0;
    }
    
    .pay-plans-wrapper {
        flex-direction: column;
        gap: 0.875rem;
        margin-bottom: 0.75rem;
    }
    
    .pay-plan-box {
        padding: 0.875rem 0.875rem;
    }
    
    .pay-plan-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .pay-plan-name {
        font-size: 1rem;
    }
    
    .pay-dropdown-select {
        min-width: 70px;
        max-width: 105px;
        font-size: 0.8125rem;
        padding: 0.4375rem 0.875rem 0.4375rem 0.4375rem;
        box-sizing: border-box;
    }
    
    .pay-plan-description {
        margin-top: 0.625rem;
        font-size: 0.75rem;
        line-height: 1.35;
        white-space: nowrap;
        overflow: hidden;
    }
    
    .pay-plan-price {
        margin-top: 0.375rem;
        font-size: 0.9375rem;
        font-weight: 700;
        text-align: left;
    }
    
    .pay-price-period {
        font-size: 0.75rem;
    }
    
    .pay-price-vat {
        font-size: 0.75rem;
    }
    
    .pay-plan-button {
        margin-top: 0.75rem;
        padding: 0.75rem 1.125rem;
        font-size: 0.8125rem;
        font-weight: 600;
    }
    
    /* 할인 정보 - 480px */
    .pay-discount-info {
        gap: 0.5rem;
        margin-top: 0.25rem;
        margin-bottom: 0.125rem;
    }
    
    .pay-original-price {
        font-size: 0.75rem;
    }
    
    .pay-discount-badge {
        padding: 0.125rem 0.375rem;
        font-size: 0.625rem;
    }
    
    /* 480px에서는 동적 여백 비활성화 */
    .pay-plan-box.has-discount-spacing .pay-discount-info.hidden {
        display: none;
        visibility: visible;
        height: auto;
    }
}

/* 서비스 플랜별 접근 권한 테이블 스타일 */

/* 테이블 래퍼 */
.pay-service-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(229, 231, 235, 0.8);
    background: var(--surface-color);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* 스크롤바 숨기기 - WebKit 브라우저 */
.pay-service-table-wrapper::-webkit-scrollbar {
    display: none;
}

/* 테이블 기본 스타일 */
.pay-service-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-color);
    font-size: 0.875rem;
}

/* 테이블 헤더 */
.pay-service-table thead th {
    background-color: #f8f9fa;
    color: var(--gray-800);
    font-weight: 600;
    padding: 0.875rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.pay-service-table thead th:first-child {
    text-align: center;
    padding-left: 1.25rem;
}

/* 테이블 바디 */
.pay-service-table tbody td {
    background-color: white;
    color: var(--gray-700);
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.pay-service-table tbody td:first-child {
    text-align: left;
    font-weight: 500;
    padding-left: 1.25rem;
    color: var(--gray-800);
    white-space: nowrap;
}

/* 마지막 행의 하단 보더 제거 */
.pay-service-table tbody tr:last-child td {
    border-bottom: none;
}

/* 체크/X 아이콘 스타일 */
.pay-service-table .fa-check {
    color: #10b981;
    font-size: 1rem;
}

.pay-service-table .fa-times {
    color: #ef4444;
    font-size: 1rem;
}

/* 1200px 브레이크포인트 */
@media (max-width: 1200px) {
    
    .pay-service-table {
        font-size: 0.8125rem;
    }
    
    .pay-service-table thead th {
        padding: 0.75rem 0.875rem;
    }
    
    .pay-service-table thead th:first-child {
        padding-left: 1rem;
    }
    
    .pay-service-table tbody td {
        padding: 0.625rem 0.875rem;
    }
    
    .pay-service-table tbody td:first-child {
        padding-left: 1rem;
        white-space: nowrap;
    }
    
    .pay-service-table .fa-check,
    .pay-service-table .fa-times {
        font-size: 0.9375rem;
    }
}

/* 900px 브레이크포인트 */
@media (max-width: 900px) {
    
    .pay-service-table {
        font-size: 0.75rem;
    }
    
    .pay-service-table thead th {
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .pay-service-table thead th:first-child {
        padding-left: 0.875rem;
    }
    
    .pay-service-table tbody td {
        padding: 0.5rem 0.75rem;
    }
    
    .pay-service-table tbody td:first-child {
        padding-left: 0.875rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    .pay-service-table .fa-check,
    .pay-service-table .fa-times {
        font-size: 0.875rem;
    }
}

/* 768px 브레이크포인트 */
@media (max-width: 768px) {
    .pay-service-table-wrapper {
        margin-bottom: 1rem;
    }
    
    .pay-service-table {
        font-size: 0.75rem;
    }
    
    .pay-service-table thead th {
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .pay-service-table thead th:first-child {
        padding-left: 0.875rem;
    }
    
    .pay-service-table tbody td {
        padding: 0.5rem 0.75rem;
    }
    
    .pay-service-table tbody td:first-child {
        padding-left: 0.875rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    .pay-service-table .fa-check,
    .pay-service-table .fa-times {
        font-size: 0.875rem;
    }
}

/* 480px 브레이크포인트 */
@media (max-width: 480px) {
    .pay-service-table-wrapper {
        margin-bottom: 0.75rem;
    }
    
    .pay-service-table {
        font-size: 0.75rem;
    }
    
    .pay-service-table thead th {
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .pay-service-table thead th:first-child {
        padding-left: 0.875rem;
    }
    
    .pay-service-table tbody td {
        padding: 0.5rem 0.75rem;
    }
    
    .pay-service-table tbody td:first-child {
        padding-left: 0.875rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    .pay-service-table .fa-check,
    .pay-service-table .fa-times {
        font-size: 0.875rem;
    }
}

/* 이용약관 스타일 */

/* 이용약관 래퍼 */
.pay-terms-wrapper {
    width: 100%;
    background: var(--surface-color);
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* 이용약관 항목 (번호가 있는 주요 항목) */
.pay-terms-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.pay-terms-item:last-child {
    margin-bottom: 0;
}

/* 이용약관 하위 항목 (별표 항목) */
.pay-terms-subitem {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    margin-left: 1.25rem;
    line-height: 1.6;
}

/* 번호 스타일 */
.pay-terms-number {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* 별표 스타일 */
.pay-terms-bullet {
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* 텍스트 스타일 */
.pay-terms-text {
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.6;
}

/* 1200px 브레이크포인트 - 이용약관 */
@media (max-width: 1200px) {
    .pay-terms-wrapper {
        padding: 1.25rem;
    }
    
    .pay-terms-item {
        gap: 0.4375rem;
        margin-bottom: 0.875rem;
    }
    
    .pay-terms-subitem {
        gap: 0.4375rem;
        margin-bottom: 0.625rem;
        margin-left: 1.125rem;
    }
    
    .pay-terms-number {
        font-size: 0.8125rem;
    }
    
    .pay-terms-bullet {
        font-size: 0.8125rem;
    }
    
    .pay-terms-text {
        font-size: 0.8125rem;
    }
}

/* 900px 브레이크포인트 - 이용약관 */
@media (max-width: 900px) {
    .pay-terms-wrapper {
        padding: 1rem;
    }
    
    .pay-terms-item {
        gap: 0.375rem;
        margin-bottom: 0.75rem;
    }
    
    .pay-terms-subitem {
        gap: 0.375rem;
        margin-bottom: 0.5rem;
        margin-left: 1rem;
    }
    
    .pay-terms-number {
        font-size: 0.75rem;
    }
    
    .pay-terms-bullet {
        font-size: 0.75rem;
    }
    
    .pay-terms-text {
        font-size: 0.75rem;
        line-height: 1.5;
    }
}

/* 768px 브레이크포인트 - 이용약관 */
@media (max-width: 768px) {
    .pay-terms-wrapper {
        padding: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .pay-terms-item {
        gap: 0.375rem;
        margin-bottom: 0.75rem;
    }
    
    .pay-terms-subitem {
        gap: 0.375rem;
        margin-bottom: 0.5rem;
        margin-left: 1rem;
    }
    
    .pay-terms-number {
        font-size: 0.75rem;
    }
    
    .pay-terms-bullet {
        font-size: 0.75rem;
    }
    
    .pay-terms-text {
        font-size: 0.75rem;
        line-height: 1.5;
    }
}

/* 480px 브레이크포인트 - 이용약관 */
@media (max-width: 480px) {
    .pay-terms-wrapper {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .pay-terms-item {
        gap: 0.375rem;
        margin-bottom: 0.625rem;
    }
    
    .pay-terms-subitem {
        gap: 0.375rem;
        margin-bottom: 0.4375rem;
        margin-left: 0.875rem;
    }
    
    .pay-terms-number {
        font-size: 0.75rem;
    }
    
    .pay-terms-bullet {
        font-size: 0.75rem;
    }
    
    .pay-terms-text {
        font-size: 0.75rem;
        line-height: 1.5;
    }
}