/* 파일경로: /tc-calculate/css/pro-tc.css */
/* 파일이름: pro-tc.css */

/* Pro TC 스타일 */
.container {
    max-width: 450px;
    margin: 0 auto;
}

/* 모드 선택 탭 */
.mode-tabs {
    display: flex;
    border-bottom: 1px solid #333333;
    margin-bottom: 30px;
}

.mode-tab {
    flex: 1;
    padding: 16px;
    background: none;
    border: none;
    color: #666666;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.mode-tab.active {
    color: #ffffff;
}

.mode-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #ffffff;
}

/* 반티완티 안내 박스 */
.intro-box {
    border-radius: 10px;
    background: #29262F;
    padding: 20px;
    margin: 0 16px 20px 16px;
}

.intro-title {
    color: #FFF;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.intro-text {
    color: #FFF;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
}

/* TC 기준 설정 */
.tc-settings {
    padding: 16px;
}

.setting-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    justify-content: space-between;
}

.setting-label {
    color: #FFF;
    font-size: 14px;
    font-weight: 500;
    max-width: 100px;
    line-height: 1.4;
    text-align: left;
    padding-right: 10px;
}

.setting-controls {
    display: flex;
    align-items: center;
}

.sub-label {
    font-size: 12px;
    color: #999;
}

.setting-btn {
    width: 130px;
    height: 45px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #999;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-btn:first-of-type {
    margin-right: 26px;
}

.setting-btn.active {
    background: transparent;
    border: 1px solid #5C82FF;
    color: #5C82FF;
}

/* 기존 입력 필드 스타일 유지하면서 최소 폰트 크기 보장 */
.setting-input {
    width: 130px;
    height: 45px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #FFF;
    font-size: 16px !important;
    padding: 0 16px;
    text-align: center;
}

.popup-input {
    width: 100%;
    height: 45px;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #FFF;
    font-size: 16px !important;
    padding: 0 16px;
}

.store-input {
    width: 120px;
    height: 45px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #FFF;
    font-size: 16px !important;
    padding: 0 12px;
}

.time-display {
    width: 100%;
    height: 45px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #FFF;
    font-size: 16px !important;
    padding: 0 16px;
    text-align: center;
    cursor: pointer;
}

.setting-input::placeholder {
    color: #666;
}

.separator {
    color: #666;
    font-size: 16px;
    margin: 0 8px;
}

.save-btn {
    width: 100%;
    height: 50px;
    background: #5C82FF;
    border: none;
    border-radius: 8px;
    color: #FFF;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}


/* 언니리스트 섹션 */
.sister-list-section {
    padding: 16px;
    padding-bottom: 8px;
}

.sister-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* 언니 선택 버튼 */
.sister-select-btn {
    flex: 1;
    height: 45px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #FFF;
    font-size: 14px;
    padding: 0 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.sister-select-btn:hover {
    border-color: #4a4a4a;
}

.sister-select-btn .select-value {
    color: #FFF;
    font-size: 14px;
}

.sister-select-btn .select-arrow {
    color: #999;
    font-size: 12px;
}

/* 언니 선택 팝업 커스텀 */
.sister-select-popup {
    max-width: 400px;
}

/* 검색 입력 필드 */
.search-input-wrapper {
    margin-bottom: 16px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 45px;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #FFF;
    font-size: 14px;
    padding: 0 16px 0 40px;
}

.search-input::placeholder {
    color: #666;
}

.search-input:focus {
    outline: none;
    border-color: #5C82FF;
}

/* 언니 리스트 컨테이너 */
.sister-list-container {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    background: #1a1a1a;
}

.sister-list-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a2a2a;
}

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

.sister-list-item.selected {
    background: #2a2a2a;
}

.sister-list-item .sister-name {
    color: #FFF;
    font-size: 14px;
    font-weight: 500;
}

.sister-list-item .sister-company {
    color: #999;
    font-size: 13px;
}

.sister-list-item.selected .sister-name {
    color: #5C82FF;
}

/* 검색 결과 없음 메시지 */
.no-result-message {
    text-align: center;
    color: #666;
    font-size: 14px;
    padding: 40px 20px;
}

/* 언니 리스트 스크롤바 */
.sister-list-container::-webkit-scrollbar {
    width: 6px;
}

.sister-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.sister-list-container::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 3px;
}

.add-sister-btn {
    width: 80px;
    height: 45px;
    background: #5C82FF;
    border: none;
    border-radius: 8px;
    color: #FFF;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.delete-sister-btn {
    width: 60px;
    height: 45px;
    background: transparent;
    border: 1px solid #5C82FF;
    border-radius: 8px;
    color: #5C82FF;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-sister-btn:hover {
    background: #5C82FF;
    color: #FFF;
}

/* 팝업 오버레이 */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.popup-overlay.active {
    display: flex;
}

/* 팝업 콘텐츠 */
.popup-content {
    background: #2a2a2a;
    border-radius: 12px;
    width: 90%;
    max-width: 350px;
    overflow: hidden;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #3a3a3a;
}

.popup-header h3 {
    color: #FFF;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.popup-close {
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-body {
    padding: 20px;
}

.popup-input-group {
    margin-bottom: 20px;
}

.popup-input-group label {
    display: block;
    color: #999;
    font-size: 14px;
    margin-bottom: 8px;
}

.popup-input {
    width: 100%;
    height: 45px;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #FFF;
    font-size: 14px;
    padding: 0 16px;
}

.popup-input::placeholder {
    color: #666;
}

.popup-submit {
    width: 100%;
    height: 50px;
    background: #5C82FF;
    border: none;
    border-radius: 8px;
    color: #FFF;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

/* 시간 계산 섹션 */
.time-calc-section {
    padding: 16px;
    padding-top: 8px;
}

.time-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.store-input {
    text-align: center;
    width: 120px;
    height: 45px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #FFF;
    font-size: 13px;
    padding: 0 12px;
}

.store-input::placeholder {
    color: #666;
    font-size: 12px;
}

/* 커스텀 타임 피커 */
.custom-time-picker {
    flex: 1;
    position: relative;
}

.time-display {
    width: 100%;
    height: 45px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #FFF;
    font-size: 14px;
    padding: 0 16px;
    text-align: center;
    cursor: pointer;
}

.time-display:focus {
    outline: none;
    border-color: #5C82FF;
}

.time-picker-dropdown {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2a2a2a;
    border: 1px solid #5C82FF;
    border-radius: 12px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    width: 90%;
    max-width: 400px;
}

.custom-time-picker.active .time-picker-dropdown {
    display: block;
}

/* 팝업 오버레이 */
.time-picker-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

.custom-time-picker.active .time-picker-overlay {
    display: block;
}

.time-picker-header {
    padding: 12px;
    text-align: center;
    color: #FFF;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #3a3a3a;
}

.time-picker-content {
    display: flex;
}

.time-column {
    flex: 1;
    border-right: 1px solid #3a3a3a;
}

.time-column:last-child {
    border-right: none;
}

.column-header {
    padding: 8px;
    text-align: center;
    color: #999;
    font-size: 12px;
    background: #1a1a1a;
}

.time-options {
    max-height: 200px;
    overflow-y: auto;
}

.time-option {
    padding: 10px;
    text-align: center;
    color: #FFF;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-option:hover {
    background: #3a3a3a;
}

.time-option.selected {
    background: #5C82FF;
    color: #FFF;
}

/* 스크롤바 스타일 */
.time-options::-webkit-scrollbar {
    width: 4px;
}

.time-options::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.time-options::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 2px;
}

.time-separator {
    color: #666;
    font-size: 16px;
    padding: 0 4px;
}

.calc-btn {
    width: 100%;
    height: 50px;
    background: #5C82FF;
    border: none;
    border-radius: 8px;
    color: #FFF;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* 계산 결과 카드 */
.result-card {
    margin: 0 16px;
    background: #1E1E1E;
    border-radius: 8px;
    padding: 0;
    overflow: visible;
    position: relative;
}

/* 결과 아이템 컨테이너 */
.result-items-container {
    padding: 0;
}

/* 결과 아이템 */
.result-item {
    padding: 16px;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
    position: relative;
    overflow: visible;
}

.result-item:last-child {
    margin-bottom: 0;
}

/* 삭제 버튼 (맨 위에 위치) */
.delete-item-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #FFF;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.delete-item-btn:hover {
    color: #5C82FF;
}

.result-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.result-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-item-number {
    color: #FFF;
    font-size: 14px;
    font-weight: 600;
}

.result-item-date {
    color: #FFF;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-item-date svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.result-item-details {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding-right: 40px; /* X 버튼 공간 확보 */
}

.result-item-store,
.result-item-sister-name,
.result-item-sister-company {
    color: #999;
    font-size: 14px;
    font-weight: 700;
}

.result-divider-text {
    color: #999;
    font-size: 14px;
    font-weight: 700;
}

.result-item-time {
    color: #5C82FF;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.result-item-counts {
    display: flex;
    gap: 20px;
}

.result-count {
    color: #FFF;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.result-count span {
    font-weight: 600;
}

/* 카운트 입력 필드 */
.count-input {
    width: 50px;
    height: 28px;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    color: #FFF;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    padding: 0 4px;
    margin: 0 4px;
}

.count-input:focus {
    outline: none;
    border-color: #5C82FF;
}

/* 숫자 입력 스피너 제거 */
.count-input::-webkit-inner-spin-button,
.count-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.count-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* 옵션 추가 스타일 */
.result-item-options {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.option-checkbox input[type="checkbox"] {
    display: none;
}

.option-checkbox .checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    background: #2a2a2a;
    position: relative;
    transition: all 0.3s ease;
}

.option-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: #5C82FF;
    border-color: #5C82FF;
}

.option-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: #FFF;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}

.option-checkbox span {
    color: #999;
    font-size: 13px;
    user-select: none;
}

.option-checkbox input[type="checkbox"]:checked ~ span {
    color: #FFF;
}

/* 총 개수 표시 박스 */
.result-summary-box {
    background: #2a2a2a;
    padding: 12px 16px;
    margin: 16px 0 0 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #575757;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.summary-label {
    color: #999;
    font-size: 11px;
    font-weight: 500;
}

.summary-value {
    color: #FFF;
    font-size: 14px;
    font-weight: 700;
}

/* 결과 카드 버튼 컨테이너 */
.result-card-buttons {
    display: flex;
    gap: 8px;
    padding: 16px;
    padding-top: 16px;
    border-top: 1px solid #575757;
}

.card-btn {
    flex: 1;
    height: 40px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-all-btn {
    background: #2a2a2a;
    color: #999;
}

.reset-all-btn:hover {
    background: #3a3a3a;
    color: #FFF;
}

.share-all-btn {
    background: #5C82FF;
    color: #FFF;
}


/* 공유 옵션 모달 */
.share-options-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.share-options-content {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 320px;
}

.share-options-content h3 {
    color: #FFF;
    font-size: 18px;
    margin: 0 0 20px 0;
    text-align: center;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.share-option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: #3a3a3a;
    border: none;
    border-radius: 8px;
    color: #FFF;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-option-btn:hover {
    background: #4a4a4a;
}

.share-option-btn span {
    font-size: 20px;
}

.close-modal-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid #666;
    border-radius: 8px;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal-btn:hover {
    border-color: #999;
    color: #FFF;
}

/* 모바일 소셜 모달 스타일 */
.share-modal-desc {
    color: #999;
    font-size: 14px;
    text-align: center;
    margin: -10px 0 20px 0;
}

.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.social-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: #3a3a3a;
    border: none;
    border-radius: 12px;
    color: #FFF;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: #4a4a4a;
    transform: translateY(-2px);
}

.social-btn img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.social-icon-text {
    font-size: 40px;
    line-height: 1;
}

.mobile-social .social-btn span {
    font-weight: 500;
}

/* divider 스타일 */
.result-divider {
    height: 1px;
    background: #575757;
    margin: 0 16px;
    position: relative;
}

/* 왼쪽 삼각형 (오른쪽을 향함) */
.result-divider::before {
    content: '';
    position: absolute;
    left: -16px;
    top: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 12px;
    border-color: transparent transparent transparent #090909;
}

/* 오른쪽 삼각형 (왼쪽을 향함) */
.result-divider::after {
    content: '';
    position: absolute;
    right: -16px;
    top: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 12px 8px 0;
    border-color: transparent #090909 transparent transparent;
}

/* 시간 수정 팝업 스타일 */
.time-edit-popup {
    max-width: 400px;
}

.time-edit-section {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.edit-time-picker {
    flex: 1;
    position: relative;
}

.edit-time-picker label {
    display: block;
    color: #999;
    font-size: 14px;
    margin-bottom: 8px;
}

/* 수정 팝업의 타임피커 드롭다운 */
.edit-time-picker .time-picker-dropdown {
    position: fixed !important;
    z-index: 2000 !important;
}

.edit-time-picker .time-picker-overlay {
    z-index: 1999 !important;
}

/* 시간 수정 팝업의 z-index 조정 */
.popup-overlay.time-edit-overlay {
    z-index: 1500;
}