/* resources/css/profile.css - Стили страницы профиля */

@import url('auth.css');

/* === Цветовая палитра (спокойные тона) === */
:root {
  --color-primary: #4a7c59;
  --color-primary-light: #5d8f6d;
  --color-primary-dark: #3a6347;
  --color-secondary: #c9a961;
  --color-secondary-dark: #b8964e;
  --color-bg-light: #f8f5f0;
  --color-bg-card: #ffffff;
  --color-bg-accent: #f0f7f4;
  --color-text-dark: #2d3748;
  --color-text-medium: #4a5568;
  --color-text-light: #718096;
  --color-border: #e2e8f0;
  --color-white: #ffffff;
  --color-error: #e53e3e;
  --color-error-light: #fff5f5;
  --color-success: #48bb78;
  --color-success-light: #f0fff4;
  --color-warning: #ed8936;
  --color-warning-light: #fffaf0;
  --color-info: #4299e1;
  --color-info-light: #ebf8ff;
  --color-blue: #3b82f6;
  --color-blue-light: #dbeafe;
  --color-purple: #8b5cf6;
  --color-purple-light: #f3e8ff;
  --color-orange: #f59e0b;
  --color-orange-light: #fef3c7;
}

/* === Основная разметка === */
.profile-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

@media (max-width: 768px) {
  .profile-container {
    padding: 1rem;
  }
}

/* === Карточка профиля === */
.profile-card {
  background: var(--color-bg-card);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.profile-header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .profile-header {
    flex-direction: row;
    align-items: center;
  }
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 2.5rem;
  font-weight: 700;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

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

@media (min-width: 768px) {
  .profile-info {
    text-align: left;
  }
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.profile-detail {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 0.25rem;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

@media (min-width: 768px) {
  .profile-actions {
    width: auto;
    flex-direction: row;
  }
}

.profile-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(201, 169, 97, 0.3);
  white-space: nowrap;
}

.profile-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(201, 169, 97, 0.4);
}

.profile-action-btn:active {
  transform: translateY(0);
}

.profile-action-btn-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.profile-action-btn-secondary:hover {
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.4);
}

.profile-action-btn-icon {
  font-size: 1.125rem;
}

/* === Статистика === */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .profile-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.profile-stat-card {
  background: var(--color-bg-card);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.profile-stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.profile-stat-value-green {
  color: var(--color-primary);
}

.profile-stat-value-blue {
  color: var(--color-blue);
}

.profile-stat-value-purple {
  color: var(--color-purple);
}

.profile-stat-value-orange {
  color: var(--color-orange);
}

.profile-stat-label {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

/* === Секция постов === */
.profile-section {
  background: var(--color-bg-card);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.profile-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.profile-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-dark);
}

.profile-section-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(74, 124, 89, 0.3);
}

.profile-section-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(74, 124, 89, 0.4);
}

/* === Список постов === */
.profile-posts-list {
  display: flex;
  flex-direction: column;
}

.profile-post-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

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

.profile-post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.profile-post-title-wrapper {
  flex: 1;
  min-width: 0;
}

.profile-post-link {
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--color-text-dark);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
  word-break: break-word;
}

.profile-post-link:hover {
  color: var(--color-primary);
}

.profile-post-category {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-left: 0.5rem;
}

.profile-post-excerpt {
  font-size: 0.875rem;
  color: var(--color-text-medium);
  margin-top: 0.5rem;
  line-height: 1.6;
}

.profile-post-meta {
  text-align: right;
  flex-shrink: 0;
}

.profile-post-date {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-bottom: 0.25rem;
}

.profile-post-stats {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

.profile-post-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.profile-post-action {
  font-size: 0.8125rem;
  color: var(--color-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

.profile-post-action:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.profile-post-status {
  font-size: 0.8125rem;
  color: var(--color-warning);
  font-weight: 500;
}

/* === Пустое состояние === */
.profile-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-light);
}

.profile-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.profile-empty-text {
  font-size: 1rem;
}

/* === Пагинация === */
.profile-pagination {
  margin-top: 1.5rem;
}

.profile-pagination .pagination {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.profile-pagination .pagination a,
.profile-pagination .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text-medium);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.profile-pagination .pagination a:hover {
  background: var(--color-bg-accent);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.profile-pagination .pagination .active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.profile-pagination .pagination .disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === Адаптивность для постов === */
@media (max-width: 640px) {
  .profile-post-header {
    flex-direction: column;
  }

  .profile-post-meta {
    text-align: left;
  }
}
