/**
 * Profile Page Styles
 * Modern, clean profile page design
 */

/* Profile Container */
.profile-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

/* Profile Card */
.profile-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Profile Header */
.profile-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    padding: 30px 40px 80px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    position: relative;
}

.profile-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: white;
    border-radius: 40px 40px 0 0;
}

.profile-header-content {
    flex: 1;
    text-align: left;
}

.profile-avatar-wrapper {
    position: relative;
    z-index: 1;
    margin-bottom: -60px;
    flex-shrink: 0;
}

.profile-avatar-large {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    border: 5px solid white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-edit {
    position: absolute;
    bottom: 5px;
    right: calc(50% - 70px);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.2s;
}

.profile-avatar-edit:hover {
    transform: scale(1.1);
}

/* Profile Info Section */
.profile-info {
    padding: 70px 40px 30px;
    text-align: center;
}

.profile-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.profile-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #e8f4fd 0%, #d4edfc 100%);
    color: #3498db;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.profile-email {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin: 0;
}

.profile-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Profile Stats */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #e9ecef;
    margin: 0 40px 30px;
    border-radius: 12px;
    overflow: hidden;
}

.profile-stat {
    background: white;
    padding: 20px;
    text-align: center;
}

.profile-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    display: block;
}

.profile-stat-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile Sections */
.profile-section {
    margin: 0 40px 24px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 16px;
}

.profile-section:last-child {
    margin-bottom: 40px;
}

.profile-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.profile-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.profile-section-icon.blue { background: #e3f2fd; }
.profile-section-icon.green { background: #e8f5e9; }
.profile-section-icon.orange { background: #fff3e0; }
.profile-section-icon.purple { background: #f3e5f5; }

.profile-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* Info List */
.profile-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.profile-info-label {
    color: #7f8c8d;
    font-weight: 500;
    font-size: 0.95rem;
}

.profile-info-value {
    color: #2c3e50;
    font-weight: 500;
    text-align: right;
}

/* Verification Cards */
.verification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.verification-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: border-color 0.2s;
}

.verification-card:hover {
    border-color: #3498db;
}

.verification-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.verification-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.verification-text h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    color: #2c3e50;
}

.verification-text p {
    margin: 0;
    font-size: 0.8rem;
    color: #95a5a6;
}

.verification-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.verification-badge.verified {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.verification-badge.pending {
    background: #fff3cd;
    color: #856404;
}

/* Notification Settings */
.notification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: white;
    border-radius: 12px;
}

.notification-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    color: #2c3e50;
}

.notification-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #95a5a6;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.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: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

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

/* Review Tabs */
.review-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.review-tab {
    padding: 14px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #7f8c8d;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.review-tab:hover {
    color: #3498db;
}

.review-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
    font-weight: 600;
}

/* Review Cards */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom scrollbar for reviews */
.review-list::-webkit-scrollbar {
    width: 6px;
}

.review-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.review-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.review-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.review-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.review-author-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    color: #2c3e50;
}

.review-author-info span {
    font-size: 0.8rem;
    color: #95a5a6;
}

.review-rating {
    color: #f39c12;
    font-size: 1rem;
}

.review-text {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.review-empty {
    text-align: center;
    padding: 40px;
    color: #95a5a6;
}

.review-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

/* Role Specific Info */
.role-info-section {
    background: linear-gradient(135deg, #e8f4fd 0%, #d4edfc 100%);
    border-left: 4px solid #3498db;
}

.role-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.role-info-card {
    background: white;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
}

.role-info-card .info-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.role-info-card .info-label {
    font-size: 0.75rem;
    color: #95a5a6;
    text-transform: uppercase;
    display: block;
}

.role-info-card .info-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

/* Edit Mode */
.profile-edit-section {
    background: white;
    margin: 0 40px 24px;
    padding: 30px;
    border-radius: 16px;
    border: 2px solid #3498db;
}

.edit-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.edit-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.edit-form-group.full-width {
    grid-column: 1 / -1;
}

.edit-form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
}

.edit-form-group input,
.edit-form-group select,
.edit-form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.edit-form-group input:focus,
.edit-form-group select:focus,
.edit-form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.edit-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

/* Buttons */
.btn-profile-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-profile-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-profile-secondary {
    padding: 12px 24px;
    background: white;
    color: #7f8c8d;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-profile-secondary:hover {
    border-color: #3498db;
    color: #3498db;
}

/* Collapsible Sections */
.profile-section--collapsible {
    padding: 0;
    overflow: hidden;
}

.profile-section--collapsible .profile-section-header {
    margin-bottom: 0;
}

.profile-section-toggle {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.profile-section-toggle:hover {
    background: rgba(0, 0, 0, 0.02);
}

.profile-section-toggle .profile-section-title {
    flex: 1;
}

.profile-section-chevron {
    font-size: 0.9rem;
    color: #7f8c8d;
    transition: transform 0.3s ease;
}

.profile-section-toggle[aria-expanded="true"] .profile-section-chevron {
    transform: rotate(180deg);
}

.profile-section-content {
    padding: 0 24px 24px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Responsive */
@media (max-width: 767px) {
    .profile-container {
        padding: 16px;
    }

    .profile-header {
        padding: 25px 20px 60px;
        flex-direction: column;
        text-align: center;
    }

    .profile-header-content {
        text-align: center;
        order: 2;
    }

    .profile-avatar-wrapper {
        order: 1;
        margin-bottom: 15px;
    }

    .profile-info {
        padding: 50px 20px 20px;
    }

    .profile-section {
        margin: 0 16px 16px;
        padding: 20px;
    }

    .profile-stats {
        margin: 0 16px 20px;
        grid-template-columns: repeat(3, 1fr);
    }

    .profile-stat {
        padding: 16px 8px;
    }

    .profile-stat-value {
        font-size: 1.4rem;
    }

    .edit-form-grid {
        grid-template-columns: 1fr;
    }

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

    .profile-actions {
        flex-direction: column;
    }
}
