/* 바드머 상세 페이지 전용 스타일 */
/* 영향 범위: 상세 레이아웃/문의 폼/티켓 목록/모달 */
/* 테스트 포인트: PC/모바일 레이아웃, 티켓 목록 모달 */

/* 컨테이너 시스템 사용 - content-max-width가 적용됨 */

/* 좌우 2컬럼 레이아웃 컨테이너 */
.badumer-profile-page .badumer-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

/* 좌측: 바드머 명함 섹션 */
.badumer-profile-page .badumer-card-section {
    position: sticky;
    /* 헤더 높이를 CSS 변수로 동적 계산 */
    top: calc(var(--header-height, 64px) + var(--spacing-md));
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    /* 스크롤 시 헤더 높이 변경에 따른 부드러운 전환 */
    transition: top var(--transition-smooth);
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.badumer-profile-page .profile-hero {
    padding: 0;
    background: transparent;
    margin-bottom: 0;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.badumer-profile-page .profile-hero-content {
    position: relative;
    width: 100%;
}

/* React 컴포넌트 루트 요소 여백 최적화 */
.badumer-profile-page #badumer-card-detail-root {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* 광고 섹션 스타일 (상세 페이지) */
.badumer-profile-page #badumer-card-detail-root .advertisement-section {
    margin: var(--spacing-lg) 0;
}

/* 명함 컴포넌트 내부 텍스트는 왼쪽 정렬 유지 */
.badumer-profile-page .profile-hero .badumer-business-card {
    text-align: left;
    width: 100%;
}

.badumer-profile-page .profile-hero-image {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.badumer-profile-page .profile-hero-placeholder {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: 700;
    margin: 0 auto var(--spacing-md);
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.badumer-profile-page .profile-hero-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 var(--spacing-xs);
    color: white;
}

.badumer-profile-page .profile-hero-intro {
    font-size: var(--font-size-base);
    opacity: 0.9;
    margin: 0;
    line-height: var(--line-height-relaxed);
}

/* 포트폴리오 링크 아이콘 버튼 */
.badumer-profile-page .profile-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.badumer-profile-page .profile-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    transition: all var(--transition-base);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.badumer-profile-page .profile-link-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: white;
}

.badumer-profile-page .profile-link-btn svg {
    width: 20px;
    height: 20px;
}

/* 포트폴리오 링크 (텍스트) */
.badumer-profile-page .profile-portfolios {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-md);
}

.badumer-profile-page .profile-portfolio-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    font-size: var(--font-size-sm);
    text-decoration: none;
    transition: all var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badumer-profile-page .profile-portfolio-chip:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

.badumer-profile-page .profile-portfolio-chip svg {
    width: 14px;
    height: 14px;
    margin-right: 6px;
}

/* 문의 안내 카드 */
.badumer-profile-page .inquiry-info-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--color-border-light);
}

.badumer-profile-page .inquiry-info-header {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.badumer-profile-page .inquiry-info-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--spacing-md);
    flex-shrink: 0;
}

.badumer-profile-page .inquiry-info-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.badumer-profile-page .inquiry-info-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0 0 var(--spacing-xs);
    color: var(--color-text-main);
}

.badumer-profile-page .inquiry-info-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-sub);
    margin: 0;
}

.badumer-profile-page .inquiry-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.badumer-profile-page .inquiry-info-item {
    display: flex;
    align-items: flex-start;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.badumer-profile-page .inquiry-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.badumer-profile-page .inquiry-info-item-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--color-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--spacing-sm);
    flex-shrink: 0;
}

.badumer-profile-page .inquiry-info-item-icon svg {
    width: 16px;
    height: 16px;
    color: var(--color-primary);
}

.badumer-profile-page .inquiry-info-item-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-sub);
    line-height: var(--line-height-relaxed);
}

/* 우측: 문의 폼 섹션 */
.badumer-profile-page .inquiry-form-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

/* 문의 폼 카드 */
.badumer-profile-page .inquiry-form-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border-light);
    width: 100%;
}

.badumer-profile-page .inquiry-form-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    padding: var(--spacing-md);
    color: white;
    text-align: center;
}

.badumer-profile-page .inquiry-form-header h4 {
    font-size: var(--font-size-xl);
    color: white;
}

.badumer-profile-page .inquiry-form-header p {
    margin: 0;
    font-size: var(--font-size-sm);
    opacity: 0.9;
}

.badumer-profile-page .inquiry-form-body {
    padding: var(--spacing-lg);
}

/* 관리자 카드 (본인 접근 시) */
.badumer-profile-page .owner-notice-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    border: 2px dashed var(--color-border);
    width: 100%;
}

/* 영향 범위: 본인 티켓 안내 배너 강조 스타일 */
/* 테스트 포인트: 본인 티켓 생성 배너 컬러/여백 */
.badumer-profile-page .owner-notice-card--highlight {
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 197, 253, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badumer-profile-page .owner-notice-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--color-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
}

.badumer-profile-page .owner-notice-icon--highlight {
    background: rgba(59, 130, 246, 0.1);
}

.badumer-profile-page .owner-notice-icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
}

.badumer-profile-page .owner-notice-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0 0 var(--spacing-xs);
    color: var(--color-primary);
}

.badumer-profile-page .owner-notice-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-sub);
    margin: 0 0 var(--spacing-lg);
}

/* 반응형 */
@media (max-width: 992px) {

    /* 태블릿 이하: 세로 배치 */
.badumer-profile-page .badumer-detail-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

.badumer-profile-page .badumer-card-section {
        position: static;
        top: auto;
    }

.badumer-profile-page .profile-hero {
        justify-content: center;
    }

.badumer-profile-page .profile-hero-content {
        justify-content: center;
    }
}

@media (max-width: 576px) {

.badumer-profile-page .badumer-detail-layout {
        gap: var(--spacing-md);
    }

    .profile-hero-image,
.badumer-profile-page .profile-hero-placeholder {
        width: 50px;
        height: 50px;
        font-size: 2.5rem;
    }

.badumer-profile-page .profile-hero-name {
        font-size: 1.5rem;
    }

    .inquiry-form-body,
.badumer-profile-page .inquiry-info-card {
        padding: var(--spacing-md);
    }
}

/* 티켓 목록 섹션 */
.badumer-profile-page .ticket-list-section {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
}

.badumer-profile-page .ticket-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.badumer-profile-page .ticket-list-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.badumer-profile-page .ticket-list-icon {
    font-size: var(--font-size-xl);
}

/* 티켓 목록 토글 버튼 */
.badumer-profile-page .ticket-list-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--color-border-light);
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--font-size-sm);
    color: var(--color-text-sub);
}

.badumer-profile-page .ticket-list-toggle:hover {
    background: var(--color-bg-subtle);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.badumer-profile-page .ticket-list-toggle:active {
    transform: scale(0.98);
}

.badumer-profile-page .ticket-list-toggle:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.badumer-profile-page .ticket-list-toggle:disabled:hover {
    background: var(--color-bg-card);
    border-color: var(--color-border-light);
    color: var(--color-text-sub);
}

.badumer-profile-page .ticket-list-toggle-icon {
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

.badumer-profile-page .ticket-list-toggle-icon.expanded {
    transform: rotate(180deg);
}

.ticket-list-loading,
.ticket-list-error,
.badumer-profile-page .ticket-list-empty {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-text-sub);
    font-size: var(--font-size-sm);
}

.badumer-profile-page .loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto var(--spacing-sm);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 티켓 목록 테이블 공통 스타일은 components.css 사용 */

/* 페이지네이션 공통 스타일은 components.css 사용 */
.badumer-profile-page .ticket-list-pagination-btn.active:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
    color: white;
}

/* 모달 스타일 */
/* 
 * 공통 모달 스타일은 pages.css의 .modal-overlay를 사용합니다.
 * 이 페이지에서 특수한 모달 스타일이 필요한 경우에만 여기에 정의합니다.
 */

/* 모달 컨텐츠 타입별 최대 너비 (공통 스타일 확장) */
.password-modal {
    max-width: 400px;
}

.ticket-detail-modal {
    max-width: 600px;
}

.ticket-detail-body {
    padding: var(--spacing-lg);
}

.badumer-profile-page .form-group,
.modal-content .form-group {
    margin-bottom: var(--spacing-lg);
}

.badumer-profile-page .form-label,
.modal-content .form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-main);
    margin-bottom: var(--spacing-sm);
}


/* modal-actions는 modal-overlay.css 공통 스타일 사용 */

/* modal-footer는 현재 사용되지 않음 */

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: var(--spacing-xs);
    vertical-align: middle;
}

/* 티켓 상세 정보 스타일 */
.ticket-detail-section {
    margin-bottom: var(--spacing-xl);
}

.ticket-detail-section:last-child {
    margin-bottom: 0;
}

.ticket-detail-section-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text-main);
    margin: 0 0 var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-border-light);
}

.ticket-detail-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.ticket-detail-info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.ticket-detail-label {
    font-weight: 600;
    color: var(--color-text-sub);
    min-width: 80px;
    flex-shrink: 0;
}

.ticket-detail-value {
    color: var(--color-text-main);
    flex: 1;
}

.ticket-detail-content {
    background: var(--color-bg-subtle);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-main);
    line-height: var(--line-height-relaxed);
}

/* 배지는 components.css 공통 스타일 사용 */
.badumer-profile-page .badge {
    padding: 0.25rem 0.75rem;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: 0;
}

/* 반응형 */
@media (max-width: 767px) {
    .modal-content {
        max-width: 100%;
        margin: var(--spacing-md);
    }

.badumer-profile-page .ticket-list-section {
        padding: var(--spacing-md);
    }

.badumer-profile-page .ticket-list-table-wrapper {
        margin-left: 0;
        margin-right: 0;
        padding: 0;
    }

.badumer-profile-page .ticket-list-table {
        font-size: var(--font-size-xs);
        table-layout: auto;
    }

    .ticket-list-table th,
.badumer-profile-page .ticket-list-item td {
        padding: var(--spacing-xs) 4px;
    }

    .ticket-list-th-date,
.badumer-profile-page .ticket-list-item-date {
        width: 18%;
        font-size: 9px;
    }

    .ticket-list-th-title,
.badumer-profile-page .ticket-list-item-title {
        width: auto;
        padding-left: var(--spacing-xs);
        padding-right: var(--spacing-xs);
    }

    .ticket-list-th-requester,
.badumer-profile-page .ticket-list-item-requester {
        width: 22%;
        font-size: var(--font-size-xs);
    }

    .ticket-list-th-status,
.badumer-profile-page .ticket-list-item-status {
        width: 18%;
    }

    .badge {
        padding: 0.2rem 0.5rem;
        font-size: 10px;
    }

.badumer-profile-page .ticket-list-pagination {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }

.badumer-profile-page .ticket-list-pagination-btn {
        min-width: 32px;
        height: 32px;
        font-size: var(--font-size-xs);
        padding: 0 var(--spacing-xs);
    }

    .ticket-detail-modal {
        max-width: 100%;
    }

    .modal-body {
        padding: var(--spacing-md);
    }

    .ticket-detail-info-item {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .ticket-detail-label {
        min-width: auto;
    }
}

/* 티켓 생성 폼 (바드머 상세) */
.badumer-profile-page .ticket-create-self-alert {
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 197, 253, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--color-text-main);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.badumer-profile-page .ticket-create-self-alert-content {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.badumer-profile-page .ticket-create-self-alert-icon {
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.badumer-profile-page .ticket-create-self-alert-title {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--color-primary);
}

.badumer-profile-page .ticket-create-self-alert-text {
    margin: 0;
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

.badumer-profile-page .ticket-create-error {
    border-radius: var(--radius-md);
}

.badumer-profile-page .ticket-create-form-section {
    margin-bottom: var(--spacing-lg);
}

.badumer-profile-page .ticket-create-section-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-sub);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--color-border-light);
}

.badumer-profile-page .ticket-create-help-text {
    display: block;
    margin-top: var(--spacing-xs);
    color: var(--color-text-sub);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

.badumer-profile-page .ticket-create-submit-btn {
    padding: 1rem 1.5rem;
    font-size: var(--font-size-lg);
    font-weight: 600;
    border-radius: var(--radius-md);
}
