/* profile-dashboard-styles.css - Styles for profile and dashboard pages */

/* === Profile Page Styles === */
.profile-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-medium);
    padding-bottom: 1rem;
}

.profile-section {
    margin-bottom: 1.5rem;
}

.profile-section h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-green);
}

.profile-field {
    margin-bottom: 1rem;
}

.profile-field-label {
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    display: block;
}

.profile-field-value {
    font-size: 1rem;
}

.profile-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-field {
    margin-bottom: 1rem;
}

.form-field.full-width {
    grid-column: span 2;
}

.form-field label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--gray-medium);
    border-radius: 4px;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--primary-green);
    outline: none;
}

.input-error {
    border-color: #f44336 !important;
}

.error-message {
    color: #f44336;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.balance-warning {
    background-color: #FFF3CD;
    border-left: 4px solid #FFC107;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

/* === Dashboard Styles === */
.dashboard-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-medium);
    padding-bottom: 1rem;
}

.dashboard-section {
    margin-bottom: 2rem;
}

.dashboard-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-green);
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    border-top: 4px solid var(--primary-green);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.dashboard-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.dashboard-card-content {
    color: var(--text-light);
}

.dashboard-card-action {
    margin-top: 1rem;
}

.dashboard-welcome {
    background-color: var(--gray-light);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-green);
}

.user-info-summary {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin-right: 1rem;
}

.user-details h3 {
    margin: 0 0 0.25rem 0;
}

.user-details p {
    margin: 0;
    color: var(--text-light);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    text-align: center;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.stat-card-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.no-nft-message {
    text-align: center;
    padding: 2rem;
    background-color: var(--gray-light);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.no-nft-message h3 {
    margin-bottom: 1rem;
}

.wallet-display {
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    display: inline-block;
    margin: 1rem 0;
    box-shadow: var(--shadow-sm);
}

/* === Role Badges === */
.role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.role-badge-admin {
    background-color: #FFD700;
    color: #000;
}

.role-badge-landowner {
    background-color: #8BC34A;
    color: #fff;
}

.role-badge-expert {
    background-color: #2196F3;
    color: #fff;
}

.role-badge-government {
    background-color: #9C27B0;
    color: #fff;
}

.role-badge-buyer {
    background-color: #FF9800;
    color: #fff;
}

.role-badge-guest {
    background-color: #BDBDBD;
    color: #fff;
}

.role-badge-neutral {
    background-color: #E0E0E0;
    color: #757575;
}

/* === Notifications === */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: var(--shadow-md);
    max-width: 400px;
    z-index: 1000;
    animation: slide-in 0.3s ease-out;
}

.notification-info {
    border-left: 4px solid #2196F3;
}

.notification-success {
    border-left: 4px solid var(--primary-green);
}

.notification-warning {
    border-left: 4px solid #FFC107;
}

.notification-error {
    border-left: 4px solid #f44336;
}

.notification-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

/* === Loading Indicators === */
.loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-green);
    animation: spin 1s linear infinite;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

/* === Animations === */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* === Helper Classes === */
.hidden {
    display: none !important;
}

/* === Media Queries === */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-field.full-width {
        grid-column: auto;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .profile-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .profile-actions button {
        width: 100%;
    }
    
    .dashboard-welcome {
        padding: 1rem;
    }
    
    .user-info-summary {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .user-avatar {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* Role Badges */
.role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.role-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

.role-badge.admin {
    background-color: #FF5722;
}

.role-badge.landowner {
    background-color: #4CAF50;
}

.role-badge.expert {
    background-color: #2196F3;
}

.role-badge.government {
    background-color: #9C27B0;
}

.role-badge.buyer {
    background-color: #FFC107;
    color: #333;
}

.role-badge.guest {
    background-color: #9E9E9E;
}

.no-roles-message {
    color: #757575;
    font-style: italic;
    font-size: 12px;
}

/* Улучшенный стиль для user-info-summary */
.user-info-summary {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    width: 100%;
}

.user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    margin-right: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.user-details {
    flex-grow: 1;
}

.user-details h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--text-color);
}

.user-details p {
    margin: 0 0 0.5rem 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Улучшенные роли */
.role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.role-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px; /* Более закругленные бейджи */
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.role-badge:hover {
    transform: translateY(-2px);
}

/* Адаптивность для всех размеров экрана */
@media (max-width: 768px) {
    .user-info-summary {
        flex-direction: row; /* Оставляем в строку даже на мобильных */
        padding: 15px;
    }
    
    .user-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-right: 1rem;
    }
    
    .user-details {
        text-align: left; /* Выравнивание по левому краю */
    }
    
    .user-details h3 {
        font-size: 1.2rem;
    }
}

/* На очень маленьких экранах можно переключиться на вертикальное отображение */
@media (max-width: 480px) {
    .user-info-summary {
        flex-direction: column;
        align-items: center;
    }
    
    .user-avatar {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .user-details {
        text-align: center;
    }
    
    .role-badges {
        justify-content: center;
    }
}

/* Стили для страницы Requests */

/* Request Filters */
.requests-filter-section {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    background-color: white;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-light);
}

/* Tabs Navigation */
.requests-tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    position: relative;
    transition: color 0.2s ease;
}

.tab-button:hover {
    color: var(--primary-green);
}

.tab-button.active {
    color: var(--primary-green);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-green);
}

/* Tab Content */
.tab-content {
    margin-bottom: 1.5rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Request List Items */
.requests-list {
    margin-bottom: 1.5rem;
}

.request-item {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.request-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.request-title {
    font-weight: 600;
    color: var(--text-color);
}

.request-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.request-status.pending {
    background-color: #FFF9C4;
    color: #F57F17;
}

.request-status.approved {
    background-color: #C8E6C9;
    color: #2E7D32;
}

.request-status.rejected {
    background-color: #FFCDD2;
    color: #C62828;
}

.request-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.request-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.request-view-btn {
    color: var(--primary-green);
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-style: italic;
    background-color: #f9f9f9;
    border-radius: 8px;
}

/* Request Detail Styles */
.request-detail-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.request-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
}

.request-detail-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.request-detail-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.request-detail-status.pending {
    background-color: #FFF9C4;
    color: #F57F17;
}

.request-detail-status.approved {
    background-color: #C8E6C9;
    color: #2E7D32;
}

.request-detail-status.rejected {
    background-color: #FFCDD2;
    color: #C62828;
}

.request-detail-field {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 0.5rem;
}

.request-field-label {
    font-weight: 500;
    min-width: 100px;
    width: 30%;
    color: var(--text-light);
}

.request-field-value {
    flex: 1;
}

.request-detail-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Button Variants */
.btn-danger {
    background-color: #f44336;
    color: white;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn-text {
    background: none;
    border: none;
    padding: 0.5rem;
    color: var(--text-color);
    cursor: pointer;
}

.btn-text:hover {
    color: var(--primary-green);
    text-decoration: underline;
}

/* Mobile Adaptations */
@media (max-width: 768px) {
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group select {
        width: 100%;
    }
    
    .requests-tabs {
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .request-detail-actions {
        flex-direction: column;
    }
    
    .request-detail-actions button {
        width: 100%;
    }
    
    .request-header,
    .request-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .request-status {
        align-self: flex-start;
    }
}

/* Стили для страницы Settings */

/* Settings Layout */
.settings-layout {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.settings-sidebar {
    width: 250px;
    flex-shrink: 0;
}

.settings-content {
    flex: 1;
}

/* Settings Navigation */
.settings-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.settings-nav-item {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.settings-nav-item:hover {
    background-color: #f5f5f5;
}

.settings-nav-item.active {
    background-color: #f0f7f0;
    border-left-color: var(--primary-green);
    color: var(--primary-green);
    font-weight: 500;
}

/* Settings Sections */
.settings-section {
    display: none;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.settings-section.active {
    display: block;
}

.settings-section h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--primary-green);
    font-size: 1.5rem;
}

/* Settings Form */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-form .form-field {
    margin-bottom: 0;
}

.settings-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.settings-form select,
.settings-form input[type="text"],
.settings-form input[type="email"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: white;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.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: var(--primary-green);
}

input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 0.95rem;
    color: var(--text-color);
}

/* Coming Soon Badge */
.coming-soon-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #757575;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Settings Actions */
.settings-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

/* Mobile Adaptations */
@media (max-width: 768px) {
    .settings-layout {
        flex-direction: column;
    }
    
    .settings-sidebar {
        width: 100%;
    }
    
    .settings-nav {
        display: flex;
        flex-wrap: wrap;
    }
    
    .settings-nav li {
        flex: 1;
        min-width: 120px;
    }
    
    .settings-nav-item {
        text-align: center;
        padding: 0.75rem;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .settings-nav-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--primary-green);
    }
    
    .settings-actions {
        flex-direction: column;
    }
    
    .settings-actions button {
        width: 100%;
    }
    
    .toggle-container {
        flex-wrap: wrap;
    }
    
    .toggle-label {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Dark Mode Styles (for future use) */
body.dark-mode .settings-section {
    background-color: #2d3748;
    color: #e2e8f0;
}

body.dark-mode .settings-nav {
    background-color: #2d3748;
}

body.dark-mode .settings-nav-item {
    color: #e2e8f0;
}

body.dark-mode .settings-nav-item:hover {
    background-color: #4a5568;
}

body.dark-mode .settings-nav-item.active {
    background-color: #2c5282;
    border-left-color: #90cdf4;
    color: #90cdf4;
}

body.dark-mode .toggle-slider {
    background-color: #4a5568;
}

body.dark-mode input:checked + .toggle-slider {
    background-color: #68d391;
}

body.dark-mode .coming-soon-badge {
    background-color: #4a5568;
    color: #e2e8f0;
}

/* Safe Area Handling for notch devices */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .settings-actions {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #e0e0e0;
}

/* Request details styles */
.request-details-summary, .request-details-full {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
}

.detail-row {
    display: flex;
    margin-bottom: 8px;
}

.detail-label {
    font-weight: 600;
    min-width: 130px;
    flex-shrink: 0;
}

.detail-value {
    flex: 1;
    word-break: break-word;
}

.comments-row {
    flex-direction: column;
}

.comments-row .detail-label {
    margin-bottom: 4px;
}

.warning-message {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin: 16px 0;
}

/* Form controls */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-control.invalid {
    border-color: #dc3545;
}

/* Status colors */
.status-pending {
    color: #ff9800;
}

.status-approved {
    color: #4caf50;
}

.status-rejected {
    color: #f44336;
}

.status-revised {
    color: #2196f3;
}

/* Styles for the update request modal */
.reviewer-comments {
    margin-bottom: 20px;
}

.reviewer-comments h4 {
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
}

.comment-box {
    background-color: #f5f5f5;
    border-left: 4px solid #2196f3;
    padding: 12px;
    border-radius: 4px;
    font-style: italic;
    color: #555;
}

.field-hint {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.form-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.form-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Invalid form control styling */
.form-control.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Стили для комментариев */
.comments-section {
    margin-top: 24px;
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
}

.comments-section h4 {
    margin-bottom: 12px;
    font-size: 16px;
    color: #333;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
    padding-right: 8px;
}

.comment-item {
    background-color: #f5f5f5;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-text {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    word-break: break-word;
}

.no-comments {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 12px;
}

.add-comment-form {
    background-color: #f9f9f9;
    padding: 12px;
    border-radius: 6px;
    margin-top: 12px;
}

.add-comment-form .form-group {
    margin-bottom: 12px;
}

.add-comment-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
}

/* Стили для уведомления о наличии комментариев */
.comments-badge {
    display: inline-block;
    background-color: #ff9800;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

.has-new-comments {
    border-left: 4px solid #ff9800;
}

.last-comment {
    padding: 8px 0;
    border-top: 1px dashed #e0e0e0;
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.comment-preview {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(255, 152, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0); }
}

/* Дополнительные стили для модальных окон */
.comment-notice {
    margin-top: 12px;
    padding: 10px;
    background-color: #e3f2fd;
    border-radius: 4px;
    font-size: 13px;
    color: #0d47a1;
}

.comment-notice p {
    margin: 0;
}

/* Стили для историй комментариев */
.comments-history {
    margin-bottom: 20px;
}

.comments-history h4 {
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
}