/* ========== ОБЩИЕ СТИЛИ ДЛЯ ПРОФИЛЕЙ ========== */
.profile-container {
    max-width: 100%;
    margin-bottom: 30px;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8dcc9;
    flex-wrap: wrap;
    gap: 15px;
}

.profile-title {
    margin: 0;
    color: #5d4037;
    font-size: 24px;
    font-weight: 600;
}

.profile-photoalbums {
	width: 100%;
	max-width: 230px;
	overflow: auto hidden;
	text-align: center;
}

/* Вкладки */
.profile-tabs {
    display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(8em, 100%), 1fr));
    margin-bottom: 25px;
    gap: 8px;
    padding-bottom: 5px;
	
	text-align: left;
}

.profile-tabs::-webkit-scrollbar {
    display: none;
}

.profile-tab {
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    flex-shrink: 0;
	padding-left: 1.5em;
    position: relative;
}

.profile-tab .fa{
	text-decoration: none;
	position: absolute;
    left: 0;
	top: 0.1em;
	line-height: inherit;
}

.profile-tab[disabled] {
	text-decoration: none;
	pointer-events: none;
	filter: grayscale(1);
	opacity: .6;
}

/*
.profile-tab:after {
    content: '👈';
	display: inline-block;
	opacity: 0;
	transform: translateX(0px);
	transition: all .3s ease;
}
.profile-tab:hover:after {
	opacity: 1;
	transform: translateX(10px);
}
*/

/* Секции и поля */
.profile-section {
    margin-bottom: 20px;
	display: grid;
	gap: 1rem 10px;
    grid-template-columns: 1fr 1fr;
}

.profile-section h2 {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ccc;
	grid-column: 1/-1;
}

.profile-section:has(h2:only-child) {
    display: none;
}

.profile-field {
	grid-column: 1/-1;
	text-align: left;
	font-size: 1.25rem;
}

.profile-field h2 {
	margin-top: 0;
}

.profile-field strong {
    display: block;
    font-weight: 600;
	line-height: 1.1;
    margin-bottom: 4px;
	text-align: left;
}

.profile-field div {
    line-height: 1.5;
}

.profile-field .emoji {
    display: inline-block;
	width: auto;
    text-align: center;
    opacity: 0.6;
}

.profile-comment {
	font-size: 1.25rem;
	width: fit-content;
    margin-top: 5px;
    padding: 5px 10px;
    background: var(--widget-bg);
    border-left: 3px solid #d4c5ad;
    border-radius: 4px;
}

.profile-comment em {
    color: #8c7b6d;
    font-style: normal;
    font-weight: 500;
}

/* Основная информация */

.profile-main-info {
    display: flex;
    align-items: flex-start;
    gap: 0 1rem;
    margin-bottom: 1rem;
	justify-content: center;
    flex-wrap: wrap;
    text-align: center;
}

.profile-info {
	width: 100%;
}

.profile-avatar-container{
	flex-shrink: 0;
}

.profile-avatar {
    width: 230px;
    height: 230px;
    border-radius: 5px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	object-fit: contain;
    background: #aaa4;
}

.profile-main-info .profile-name {
    display: flex;
    align-items: center;
    gap: 10px;
	font-size: 2rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.profile-basic-details {
    font-size: 1.25rem;
    margin: 0;
}

.profile-basic-details .completeness-warning {
	color: #a00;
}

.profile-info .onliner.online {
	color: #090;
}

.profile-basic-details span+span:before {
	content: ' • ';
}

.profile-about-me{
	text-align: left;
	margin-top: 10px;
    white-space: pre-line;
}

/* Фотогалерея */
.profile-photo-block{
	max-width: 100%;
	flex-shrink: 0;
}

.profile-photos-section {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.profile-photo-item {
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
	width: 70px;
	min-width: 70px;
    aspect-ratio: 1;
}

.profile-photo-item:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.profile-photo-item:only-child {
	display: none;
}

.profile-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-photo-count {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    font-size: 12px;
    border-top-left-radius: 5px;
}

/* Слайдер */
.photo-slider-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(5px);
}

.photo-slider-modal.active {
    display: flex;
    opacity: 1;
}

.photo-slider-container {
    width: 90%;
    max-width: 900px;
    height: 80vh;
    position: relative;
    background: black;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.photo-slider-main {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    touch-action: pan-y pinch-zoom;
}

.slider-photo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: none;
}

.slider-photo.active {
    display: block;
    animation: fadeInSlide 0.4s ease;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.slider-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

.slider-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.slider-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.slider-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.slider-thumbnails {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    z-index: 5;
}

.slider-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.slider-thumb:hover {
    opacity: 0.9;
}

.slider-thumb.active {
    opacity: 1;
    border-color: white;
}

.slider-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Кнопки действий */
.profile-actions {
    display: grid;
	gap: 5px;
	grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
	font-size: 1rem;
}

.profile-actions-top{
	margin-bottom: 1rem;
}

.profile-actions .button {
    text-align: center;
    padding: 0.2em;
}

.profile-actions .button i {
    font-size: 20px;
}

.profile-delete-btn {
    color: var(--accent-color)!important;
}

.profile-restore-btn {
    background: #4caf50;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.profile-restore-btn:hover {
    background: #388e3c;
}

/* Состояния */
.profile-empty, .profile-auth-message, .profile-banned, .profile-error {
    font-weight: 500;
	color: var(--accent-color);
	padding: 30px 0;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.profile-edit-back {
    margin-bottom: 20px;
}

.profile-edit-back a {
    color: #5d4037;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.profile-edit-back a:hover {
    text-decoration: underline;
}

/* Индикатор загрузки */
.slider-photo.loading {
    background: #222;
    display: block;
}

.slider-photo.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Формы/попапы */
#report_form {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 10;
	width: 400px;
	max-width: calc(100vw - 20px);
}

.profile-delete-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.profile-delete-modal-content {
    background: var(--widget-bg);
    padding: 25px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.profile-delete-modal-title {
    margin-top: 0;
}

.profile-delete-button-group {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

#profile_personal_note_form {
    display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 10;
	width: 400px;
	max-width: calc(100vw - 20px);
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInSlide {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tablet + */
@media (min-width: 801px){
	
	.profile-main-info {
		flex-wrap: nowrap;
		justify-content: flex-start;
		text-align: left;
	}
	
	.profile-actions{
		font-size: inherit;
		grid-template-columns: repeat(auto-fit, 5.5rem);
	}
	
	.profile-actions .button{
		white-space: nowrap;
	}
	
	.profile-tabs {
		font-size: inherit;
	}
	
	.profile-field {
		font-size: inherit;
		display: grid;
		gap: 0 1rem;
		grid-template-columns: 12em auto;
		align-items: baseline;
	}
	
	.profile-field>strong{
		hyphens: none;
		text-align: right;
		grid-row: 1 / 3;
	}
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .profile-title {
        font-size: 20px;
    }
    
    .photo-slider-container {
        width: 95%;
        height: 70vh;
        border-radius: 8px;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .slider-prev {
        left: 10px;
    }
    
    .slider-next {
        right: 10px;
    }
    
    .slider-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
    
    .slider-thumbnails {
        padding: 10px;
        gap: 5px;
    }
    
    .slider-thumb {
        width: 50px;
        height: 50px;
    }
    
    .slider-counter {
        bottom: 60px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .photo-slider-container {
        height: 60vh;
    }
    
    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .slider-thumbnails {
        padding: 8px;
    }
    
    .slider-thumb {
        width: 40px;
        height: 40px;
    }
}

/* Кнопки для чужого профиля */

.azb-btn {
    border: 1px solid #6b4f38;
}

.profile-actions-bottom {
	display: flex;
	align-items: flex-start;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 1rem;
}