/* 메인 컨텐츠 - 모든 페이지 통일 */
main {
    width: 100vw;
    overflow: hidden;
    /* 스크롤 완전 차단 */
    padding-top: 70px;
    /* 헤더 높이와 일치 */
    height: 100vh;
    /* 전체 화면 높이 */
    background-color: #f8f9fa;
}

/* 푸터 숨기기 */
footer {
    display: none !important;
}

.stamp-image {
    width: 50px;
}


.nav-tabs .nav-link {
    width: 100%;
    color: #818181;
    border-bottom: none;
    border-radius: 0;
}

.nav-tabs .nav-link.active {
    background-color: #ffffff;
    /* 배경색 */
    color: #000000 !important;
    /* 텍스트 색상 */

}

#userTabContent {
    background-color: #ffffff;
    /* 배경색 */
    height: 76vh;
    box-sizing: border-box;

}

#result-photo {
    width: 2.5rem;
    height: auto;
}

#active-stamp {
    position: relative;
    display: inline-block;
}

#many-stamp {
    position: absolute;
    bottom: -5px;
    right: -5px;
    font-size: 0.75rem;
    color: red;
}

.card {
    border-radius: 0 !important;
}

.photo-card {
    height: 80px !important;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.img-thumbnail {
    border-radius: 0 !important;
    padding: 0 !important;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.img-container {
    width: 25%;
    height: 100%;
    /* overflow: hidden; */
    box-sizing: border-box;
    /* flex-shrink: 0; */
    padding: 3px;
}

#photo-title {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;

    font-weight: bold;
}

#photo-desc {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: #818181;
}

#photo {
    height: 100%;
}

#photo-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}



main.loading-block {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    opacity: 0.6;
    /* 비활성화 느낌, 필요 없으면 제거 가능 */
}

.coupon-list {
    padding: 0.5rem !important;

}

.coupon-card {
    border: 1px solid #e2e5ea;
    border-radius: 0.6rem;
    background: #fff;
}

.coupon-card-body {
    padding: 0.75rem 0.9rem;
}

.coupon-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.6rem;
}

.coupon-discount {
    font-size: 1rem;
    font-weight: 700;
    color: #2d2f33;
}

.coupon-discount-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6c757d;
    margin-left: 0.3rem;
}

.coupon-status {
    font-size: 0.7rem;
    letter-spacing: 0.2px;
}

.coupon-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.45rem;
}

.coupon-date {
    font-size: 0.75rem;
    color: #6c757d;
}

.coupon-code {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: #2d2f33;
}

.coupon-code .label {
    color: #6c757d;
}

.coupon-code .code {
    font-weight: 600;
    letter-spacing: 0.3px;
    font-family: "Courier New", monospace;
}

.coupon-card--disabled {
    opacity: 0.6;
}

#coupon-percent,
#coupon-text {
    margin-bottom: 0 !important;
    ;
}

#coupon-title {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;

    font-weight: bold;
}

#coupon-desc {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: #818181;
}

#coupon {
    height: 100%;
}

#coupon-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

#stamp-title {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;

    font-weight: bold;
}

#stamp-desc {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: #818181;
}

.text-muted {
    color: #bebfc1 !important;
}

.empty-state-message {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1.5rem 0;
}


.agreement {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 20px;
}

#agreement-label {
    margin-bottom: 0;
    flex: 1;
    line-height: 1.4;
}

#agreement-btn {
    font-size: 0.85rem;
    padding: 6px 14px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 모바일에서 개인정보 동의 영역 최적화 */
@media (max-width: 768px) {
    .agreement {
        flex-direction: row;
        align-items: flex-start;
        gap: 6px;
    }

    #agreement-label {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    #agreement-btn {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
}

/* 체크박스와 라벨 정렬 개선 */
.agreement input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.agreement label {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

/* 매우 작은 화면에서의 최적화 */
@media (max-width: 480px) {
    .agreement {
        gap: 4px;
    }

    #agreement-label {
        font-size: 0.8rem;
    }

    #agreement-btn {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
}


/* 로그인/회원가입 제목 및 설명 스타일 통일 */
#login-title,
#signup-title {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    font-weight: bold;
}

#login-desc,
#signup-desc {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #818181;
}

/* 폼 그룹 여백 조정 */
#login-form .form-group,
#register-form .form-group {
    margin-bottom: 1rem;
}

#login-form .btn,
#register-form .btn {
    width: 100%;
}

#photo-grid {
    margin-top: 0.5rem !important;
    height: auto;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

#stamp-list {
    margin-top: 0.5rem !important;
    height: 47.5vh;
    overflow-y: auto;
}

#coupon-list {
    margin-top: 0.5rem !important;
    height: auto;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.photo-item {
    margin-bottom: 0.5rem !important;
}



.w-auto {
    margin-top: 0.2rem !important;
    padding: 0.1rem;
    font-size: 0.7rem;
    margin-right: 0 !important;
}

#photo-filter {
    margin-bottom: 0 !important;
    width: 100%;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 0.45rem !important;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.2rem 0;
}

#coupon-filter {
    margin-bottom: 0 !important;
    width: 100%;
    display: flex !important;
    flex-direction: column;
    align-items: flex-end !important;
    gap: 0.3rem !important;
    flex-wrap: nowrap;
    padding: 0.2rem 0;
}

#coupon-filter .coupon-filter-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
    width: 100%;
}

#coupon-filter .coupon-date-range {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: nowrap;
}

#coupon-filter .coupon-date-label {
    font-size: 0.7rem;
    color: #6c757d;
}

#coupon-filter .coupon-date-separator {
    font-size: 0.7rem;
    color: #6c757d;
}

#coupon-filter .coupon-date-input {
    width: 104px;
    min-width: 96px;
    padding: 0 0.4rem;
    font-size: 0.7rem;
}

@media (max-width: 576px) {
    #coupon-filter {
        align-items: stretch !important;
    }

    #coupon-filter .coupon-filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }

    #coupon-filter .coupon-filter-row--selects {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    #coupon-filter .coupon-filter-row--selects .coupon-filter-control {
        width: auto;
        flex: 1 1 0;
        min-width: 0;
    }

    #coupon-filter .coupon-filter-control {
        width: 100%;
        height: 32px;
        font-size: 0.8rem;
    }

    #coupon-filter .coupon-date-range {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr auto;
        gap: 0.3rem;
    }

    #coupon-filter .coupon-date-label {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    #coupon-filter .coupon-date-separator {
        display: none;
    }

    #coupon-filter .coupon-date-input {
        width: 100%;
        min-width: 0;
        padding: 0 0.5rem;
    }

    #coupon-filter #coupon-date-start {
        grid-column: 1 / 2;
        grid-row: 2;
    }

    #coupon-filter #coupon-date-end {
        grid-column: 2 / 3;
        grid-row: 2;
    }

    #coupon-filter #coupon-date-clear {
        grid-column: 3 / 4;
        grid-row: 2;
        width: auto;
        padding: 0 0.6rem;
        justify-self: end;
    }

}

#coupon-filter .coupon-filter-control {
    height: 32px;
    font-size: 0.75rem;
    padding: 0 0.6rem;
    margin-top: 0 !important;
    line-height: 1.2;
    white-space: nowrap;
}

#current-stamp {
    margin-bottom: 0 !important;
    border-bottom: #cccccc double 3px;
}

.display-stamp-image {
    width: 1.8rem;

}

#current-stamp-text {
    font-size: 0.5rem;
    border-radius: 0;
    padding: 0.2rem;
    margin-bottom: 0.2rem !important;
    margin-top: 0 !important;
}

#current-stamp-text-zone {
    justify-content: flex-end;
    align-items: center;
}

.coupon-success {
    color: #28a745;
    font-size: 0.8rem;
}






/* 로딩 스피너 */
.loading-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#photo-grid.is-loading>*:not(#photo-loading) {
    display: none;
}

#coupon-list.is-loading>*:not(#coupon-loading) {
    display: none;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 페이드 효과 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content>.tab-pane {
    transition: opacity 0.3s ease-in-out;
}