/* 프로필 페이지 스타일 */

/* 로딩 화면 스타일 */
.initial-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    width: 100%;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* 메인 컨테이너 */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1; /* 헤더 드롭다운보다 낮게 설정 */
}

/* 프로필 헤더 */
.profile-header {
    margin-bottom: 2rem;
}

.profile-cover {
    position: relative;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 4rem;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-container {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.edit-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #4361ee;
    color: #fff;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-avatar-btn:hover {
    background-color: #3a56d4;
    transform: scale(1.1);
}

.profile-info {
    text-align: center;
}

.profile-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.profile-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9375rem;
}

.profile-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.profile-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #f5f5f5;
    border-radius: 20px;
    font-size: 0.875rem;
    color: #333;
}

.profile-badge i {
    color: #4361ee;
}

/* 프로필 탭 */
.profile-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 0.5rem;
    background-color: #f9f9f9;
    padding: 0.75rem;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.profile-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    background-color: transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-tab:hover {
    background-color: rgba(67, 97, 238, 0.08);
    color: #4361ee;
    transform: translateY(-2px);
}

.profile-tab.active {
    background-color: #4361ee;
    color: #fff;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.profile-tab i {
    font-size: 1.1rem;
}

/* 프로필 콘텐츠 */
.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}

.content-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

/* 소개 탭 */
.intro-section {
    margin-bottom: 2rem;
}

.intro-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1rem;
}

.edit-intro-btn {
    margin-top: 1rem;
}

.info-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.info-item {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
}

.info-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.info-value {
    font-size: 1rem;
    color: #333;
}

.points-section {
    margin-bottom: 2rem;
}

.points-card {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.points-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.points-header i {
    color: #f59e0b;
    font-size: 1.25rem;
}

.points-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.points-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
}

.points-actions {
    display: flex;
    gap: 1rem;
}

/* 내 숙소 탭 */
.listings-header,
.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.listings-count,
.favorites-count {
    font-size: 1rem;
    color: #666;
}

.listings-grid,
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.listing-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.listing-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.listing-image {
    position: relative;
    height: 180px;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

.listing-rating {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 4px;
}

.listing-rating i {
    color: #f59e0b;
}

/* 하트 버튼 스타일 */
.heart-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.heart-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.heart-btn i {
    font-size: 1.2rem;
    color: #e74c3c;
    transition: all 0.3s ease;
}

.heart-btn.liked i {
    color: #e74c3c;
}

.heart-btn:not(.liked) i {
    color: #ccc;
}

.heart-btn:not(.liked):hover i {
    color: #e74c3c;
}

.heart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.heart-btn:disabled:hover {
    transform: none;
}

/* 하트 액션 버튼 스타일 */
.heart-action-btn.liked {
    color: #e74c3c;
    border-color: #e74c3c;
}

.heart-action-btn.liked:hover {
    background-color: #e74c3c;
    color: white;
}

.heart-action-btn:not(.liked) {
    color: #666;
    border-color: #ccc;
}

.heart-action-btn:not(.liked):hover {
    background-color: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

.listing-badge.active {
    background-color: #10b981;
}

.listing-badge.inactive {
    background-color: #ef4444;
}

.listing-info {
    padding: 1rem;
    flex-grow: 1;
}

.listing-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.listing-location {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.listing-type-inline {
    background-color: #f0f0f0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #555;
    white-space: nowrap;
}

.listing-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.listing-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: #666;
}

.listing-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.listing-details i {
    color: #4361ee;
}

.review-count {
    color: #666;
    font-size: 0.75rem;
}

.listing-type {
    background-color: #f0f0f0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #555;
}

.listing-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid #eee;
}

.listing-actions .btn {
    flex: 1;
    font-size: 0.875rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.empty-state, .error-state {
    grid-column: 1 / -1;
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 3rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-state i, .error-state i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.error-state i {
    color: #ef4444;
}

.empty-state p, .error-state p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* 무한 스크롤로 변경되어 더 이상 사용하지 않음 */

/* 후기 탭 */
.reviews-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.reviews-tab {
    padding: 0.75rem 1rem;
    background-color: transparent;
    border: none;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.reviews-tab:hover {
    color: #4361ee;
}

.reviews-tab.active {
    color: #4361ee;
    font-weight: 600;
}

.reviews-tab.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #4361ee;
}

.reviews-content {
    display: none;
}

.reviews-content.active {
    display: block;
}

.review-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.review-avatar, .review-listing-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
}

.review-user, .review-listing {
    flex: 1;
}

.review-name, .review-listing-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.review-listing-name {
    color: #333;
    text-decoration: none;
    display: block;
}

.review-listing-name:hover {
    color: #ff385c;
    text-decoration: underline;
}

.review-date {
    color: #717171;
    font-size: 14px;
    margin-bottom: 5px;
}

.review-rating {
    display: flex;
    align-items: center;
}

.review-rating .fas.fa-star {
    color: #ff385c;
    margin-right: 2px;
    font-size: 14px;
}

.review-rating .far.fa-star {
    color: #ddd;
    margin-right: 2px;
    font-size: 14px;
}

.review-rating .fas.fa-star-half-alt {
    color: #ff385c;
    margin-right: 2px;
    font-size: 14px;
}

.review-rating span {
    margin-left: 5px;
    font-weight: 600;
    font-size: 14px;
}

.review-content {
    color: #333;
    line-height: 1.5;
    margin-top: 10px;
}

/* 설정 탭 */
.settings-section {
    margin-bottom: 2rem;
}

.settings-card {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.settings-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

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

.settings-label {
    width: 120px;
    font-size: 0.9375rem;
    color: #666;
}

.settings-value {
    flex: 1;
    font-size: 1rem;
    color: #333;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.settings-toggle:last-child {
    border-bottom: none;
}

.toggle-label {
    font-size: 0.9375rem;
    color: #333;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #4361ee;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.payment-method {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.payment-icon {
    width: 40px;
    height: 40px;
    background-color: #e9e9e9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: #666;
    font-size: 1.25rem;
}

.payment-details {
    flex: 1;
}

.payment-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
}

.payment-number {
    font-size: 0.875rem;
    color: #666;
}

.payment-actions {
    display: flex;
    gap: 0.5rem;
}

.add-payment-btn {
    margin-top: 1rem;
    width: 100%;
}

.btn-danger {
    background-color: #ef4444;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* 버튼 스타일 - 프로필 페이지 내부에서만 사용되는 버튼에 한정 */
.profile-container .btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-container .btn-primary {
    background-color: #4361ee;
    color: #fff;
    border: none;
}

.profile-container .btn-primary:hover {
    background-color: #3a56d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}

.profile-container .btn-outline {
    background-color: transparent;
    color: #4361ee;
    border: 1px solid #4361ee;
}

.profile-container .btn-outline:hover {
    background-color: rgba(67, 97, 238, 0.05);
    transform: translateY(-2px);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .profile-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .profile-tabs {
        flex-wrap: wrap;
    }

    .profile-tab {
        flex: 1;
        min-width: 120px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .points-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .listings-grid,
    .favorites-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .profile-cover {
        height: 150px;
        margin-bottom: 3rem;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-avatar-container {
        bottom: -40px;
    }

    .profile-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }

    .profile-tab {
        width: 100%;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-avatar,
    .review-listing-image {
        margin-bottom: 0.5rem;
    }

    .review-rating {
        margin-top: 0.5rem;
    }

    .settings-item,
    .payment-method {
        flex-direction: column;
        align-items: flex-start;
    }

    .settings-label {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .settings-value {
        margin-bottom: 0.5rem;
    }

    .payment-icon {
        margin-bottom: 0.5rem;
    }

    .payment-details {
        margin-bottom: 0.5rem;
    }
}

/* 모달 스타일 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#intro-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    resize: vertical;
}

/* 로딩 인디케이터 스타일 */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    grid-column: 1 / -1;
    width: 100%;
    color: #666;
    font-size: 0.9rem;
}

.loading-indicator i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.load-error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1rem;
    color: #ef4444;
    font-size: 0.9rem;
    background-color: #fee2e2;
    border-radius: 8px;
    margin: 1rem 0;
}

/* 리뷰 카드 내 숙소 정보 스타일 */
.review-house-info {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
}

.review-house-info .house-details {
    display: flex;
    flex-direction: column;
}

.review-house-info .house-title {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    margin-bottom: 4px;
    font-size: 15px;
}

.review-house-info .house-title:hover {
    color: #ff385c;
    text-decoration: underline;
}

.review-house-info .house-label {
    font-size: 0.8rem;
    color: #666;
}

/* 프로필 페이지 알림 메시지 스타일 */
.profile-notification-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1100;
    animation: slideDown 0.3s ease, slideUp 0.3s ease 2.7s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-notification-message.success {
    background-color: #10b981;
    color: white;
}

.profile-notification-message.error {
    background-color: #ef4444;
    color: white;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* 토글 로딩 스타일 */
.toggle-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

.toggle-loading i {
    color: #4361ee;
}
