/**
 * Profile Hub Styles
 * Custom styling for the WordPress Profile Hub plugin
 */

/* Container styles */
.profile-hub-container {
    max-width: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: #fff;
    overflow: hidden;
    min-height: auto;
}

/* Layout structure */
.profile-hub-layout {
    display: flex;
    min-height: auto;
}

/* Sidebar styles */
.profile-hub-sidebar {
    width: 250px;

    display: flex;
    flex-direction: column;
    min-height: auto;
}

.profile-hub-user-info {
    color: #fff;
    padding: 1.5rem;
    text-align: center;
}

.profile-hub-avatar {
    margin-bottom: 1rem;
}

.profile-hub-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.profile-hub-user-details h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Sidebar tabs */
.profile-hub-sidebar-tabs {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.profile-hub-sidebar-tabs li {
    margin: 0;
}

.profile-hub-sidebar-tabs li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.profile-hub-sidebar-tabs li.active a {
    background-color: #e9ecef;
    color: #007BFF;
    border-left: 4px solid #007BFF;
}

.profile-hub-sidebar-tabs li a:hover {
    background-color: #e9ecef;
    color: #007BFF;
}

.profile-hub-tab-icon {
    margin-right: 10px;
    font-size: 18px;
}

/* Main content area */
.profile-hub-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.profile-hub-content h2 {
    margin-top: 0;
    font-size: 1.8rem;
    color: #343a40;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.profile-hub-content h3 {
    font-size: 1.4rem;
    color: #343a40;
    margin: 1.5rem 0 1rem;
}

/* Form styling */
.profile-hub-form-group {
    margin-bottom: 1.5rem;
}

.profile-hub-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.profile-hub-form-group input[type="text"],
.profile-hub-form-group input[type="email"],
.profile-hub-form-group input[type="password"],
.profile-hub-form-group textarea,
.profile-hub-form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out;
}

.profile-hub-form-group input[type="text"]:focus,
.profile-hub-form-group input[type="email"]:focus,
.profile-hub-form-group input[type="password"]:focus,
.profile-hub-form-group textarea:focus,
.profile-hub-form-group select:focus {
    border-color: #007BFF;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(14, 159, 110, 0.25);
}

/* Buttons */
.profile-hub-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.profile-hub-button.primary {
    background-color: #007BFF;
    border-color: #007BFF;
    color: #fff;
}

.profile-hub-button.primary:hover {
    background-color: #0b875c;
    border-color: #0b875c;
}

.profile-hub-button.secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.profile-hub-button.secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}


/* Image upload */
.profile-hub-image-upload {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.profile-hub-image-upload img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ced4da;
}

/* Dashboard styling */
.profile-hub-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-hub-stat-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-hub-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.profile-hub-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(14, 159, 110, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007BFF;
}

.profile-hub-stat-icon i {
    font-size: 24px;
}

.profile-hub-stat-content h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.profile-hub-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #343a40;
}

/* Activity list */
.profile-hub-activity {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.profile-hub-activity-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-hub-activity-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-hub-activity-list li:last-child {
    border-bottom: none;
}

.profile-hub-activity-list i {
    color: #007BFF;
}

/* Feedback section */
.profile-hub-feedback {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.profile-hub-rating {
    display: flex;
    gap: 0.5rem;
}

.profile-hub-star {
    font-size: 1.5rem;
    cursor: pointer;
    color: #ced4da;
}

.profile-hub-star.active {
    color: #ffc107;
}

/* Quiz table */
.profile-hub-quizzes {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.profile-hub-quiz-table {
    width: 100%;
    border-collapse: collapse;
}

.profile-hub-quiz-table th,
.profile-hub-quiz-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.profile-hub-quiz-table th {
    background-color: #f1f3f5;
    font-weight: 600;
}

/* Settings toggle */
.profile-hub-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

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

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

.profile-hub-toggle input:checked + .profile-hub-toggle-slider {
    background-color: #007BFF;
}

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

.profile-hub-account-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

/* Messages */
.profile-hub-message,
.profile-hub-feedback-message,
.profile-hub-settings-message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.profile-hub-message.success,
.profile-hub-feedback-message.success,
.profile-hub-settings-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.profile-hub-message.error,
.profile-hub-feedback-message.error,
.profile-hub-settings-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive styles */
@media (max-width: 768px) {
    .profile-hub-layout {
        flex-direction: column;
    }
    
    .profile-hub-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .profile-hub-sidebar-tabs {
        display: flex;
        flex-wrap: wrap;
        padding: 0;
    }
    
    .profile-hub-sidebar-tabs li {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .profile-hub-sidebar-tabs li a {
        flex-direction: column;
        padding: 0.75rem;
    }
    
    .profile-hub-sidebar-tabs li.active a {
        border-left: none;
        border-bottom: 3px solid #007BFF;
    }
    
    .profile-hub-tab-icon {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .profile-hub-stats-container {
        grid-template-columns: 1fr;
    }
    
    .profile-hub-main {
        padding: 1rem;
    }
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-initial {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #FFD700; /* Gold */
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    font-family: Arial, sans-serif;
}
