/* ==========================================================================
   🔔 스크랩(북마크) & 마이페이지 클릭 위젯 전용 스타일시트 (scrap-frontend.css)
   ========================================================================== */

/* --- 상세 페이지 북마크(스크랩) 버튼 --- */
.dgd-scrap-btn {
    background: none;
    border: none;
    padding: 6px;
    margin-left: 10px;
    cursor: pointer;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.1s;
    vertical-align: middle;
}

.dgd-scrap-btn:hover {
    color: #ef4444;
}

.dgd-scrap-btn:active {
    transform: scale(0.9);
}

/* 스크랩 활성화 상태 (스샷 4처럼 색칠된 상태) */
.dgd-scrap-btn.active {
    color: #ef4444;
}

.dgd-scrap-btn .icon-fill {
    display: none;
}
.dgd-scrap-btn .icon-line {
    display: inline-block;
}
.dgd-scrap-btn.active .icon-fill {
    display: inline-block;
}
.dgd-scrap-btn.active .icon-line {
    display: none;
}

/* --- 서비스 목록(아카이브) 썸네일 오버레이 북마크 배지 --- */
.card-image-box {
    position: relative;
}

.dgd-archive-scrap-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ffffff;
    color: #ef4444;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    pointer-events: none;
}

.dgd-archive-scrap-badge svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* --- 메인 GNB 마이페이지 드롭다운 위젯 --- */
.dgd-mypage-widget-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.btn-dgd-mypage-trigger {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: #334155;
    display: inline-flex;
    align-items: center;
    border-radius: 20px;
    transition: background 0.2s, color 0.2s;
}

.btn-dgd-mypage-trigger:hover,
.btn-dgd-mypage-trigger.active {
    background: #f1f5f9;
    color: #0f172a;
}

/* 마이페이지 드롭다운 레이어 */
.dgd-mypage-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    width: 280px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid #e2e8f0;
    padding: 24px;
    z-index: 10000;
    box-sizing: border-box;
    text-align: left;
}

.dgd-mypage-dropdown.show {
    display: block;
    animation: dgdDropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dgdDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dgd-mypage-dropdown-header {
    margin-bottom: 20px;
}

.dgd-mypage-dropdown-header .welcome-text {
    font-size: 13.5px;
    color: #64748b;
    display: block;
    margin-bottom: 4px;
}

.dgd-mypage-dropdown-header .user-name {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}

.dgd-mypage-dropdown-header .user-name-highlight {
    color: #2563eb;
}

/* 포인트/캐시 (디폴트 none) */
.dgd-mypage-dropdown-balances {
    display: none; /* 추후 오픈용 */
    justify-content: space-between;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* 드롭다운 메뉴 리스트 */
.dgd-mypage-dropdown-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dgd-mypage-dropdown-menu li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.dgd-mypage-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #334155;
    font-weight: 600;
    font-size: 14.5px;
    transition: background 0.2s;
}

.dgd-mypage-menu-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.dgd-mypage-menu-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dgd-mypage-menu-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 14px;
}

/* 메뉴별 아이콘 박스 색상 */
.icon-scrap {
    background: #fef2f2;
    color: #ef4444;
}
.icon-inquiry {
    background: #eff6ff;
    color: #3b82f6;
}
.icon-profile {
    background: #f1f5f9;
    color: #64748b;
}

.dgd-mypage-menu-arrow {
    color: #94a3b8;
}

/* 로그아웃 영역 */
.dgd-mypage-dropdown-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.dgd-logout-link {
    font-size: 13.5px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.dgd-logout-link:hover {
    color: #64748b;
}

/* --- 스크랩 페이지 모아보기 UI (.dgd-scrap-page-container) --- */
.dgd-scrap-page-container {
    font-family: inherit;
}

.scrap-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.scrap-tabs .tab-btn {
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    background: #f1f5f9;
    color: #475569;
    transition: all 0.2s;
}

.scrap-tabs .tab-btn:hover {
    background: #e2e8f0;
}

.scrap-tabs .tab-btn.active {
    background: #0056ff !important;
    color: #ffffff !important;
}

.scrap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.scrap-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.scrap-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.scrap-card .card-thumb {
    height: 170px;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
}

.scrap-card .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.scrap-card:hover .card-thumb img {
    transform: scale(1.05);
}

.scrap-card .btn-remove-scrap {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: #ffffff;
    color: #ef4444;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: background 0.2s, color 0.2s;
    z-index: 5;
}

.scrap-card .btn-remove-scrap:hover {
    background: #ef4444;
    color: #ffffff;
}

.scrap-card .card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.scrap-no-results {
    text-align: center;
    padding: 80px 20px;
    background: #f8fafc;
    border-radius: 20px;
    color: #64748b;
    font-size: 15px;
    border: 1px dashed #e2e8f0;
}
