:root {
    --pn-wph-color-main-0: #a42d2d;
}

/* Family Page Styles */
.pn-wph-family-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.pn-wph-family-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: var(--pn-wph-color-main-0);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.pn-wph-family-header h1 {
    color: white;
    font-size: 2.5rem;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.pn-wph-family-header p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

.pn-wph-family-section {
    margin-bottom: 80px;
}

/* Removed h2 styles since titles are no longer displayed */

.pn-wph-family-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
    max-width: 100%;
}

/* Ensure cards don't exceed 1/4 of screen width */
@media (min-width: 1400px) {
    .pn-wph-family-cards {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .pn-wph-family-cards {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .pn-wph-family-cards {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Family Card Styles */
.pn-wph-family-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.pn-wph-family-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.pn-wph-parent-card {
    border-color: transparent;
}

.pn-wph-child-card {
    border: none;
    position: relative;
}

.pn-wph-child-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 15px solid;
    border-color: inherit;
    border-radius: 15px;
    opacity: 0.5;
    pointer-events: none;
}

/* Child Action Buttons */
.pn-wph-child-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    display: flex;
    gap: 8px;
}

.pn-wph-action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pn-wph-action-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.pn-wph-action-btn i {
    font-size: 18px;
}

.pn-wph-edit-child {
    color: #007cba;
}

.pn-wph-delete-child {
    color: #dc3232;
}

.pn-wph-card-header {
    display: flex;
    align-items: center;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.pn-wph-avatar-container {
    margin-right: 20px;
}

.pn-wph-avatar {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pn-wph-user-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    color: #333;
    font-weight: 600;
}

.pn-wph-user-role {
    margin: 0;
    color: var(--pn-wph-color-main-0);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.pn-wph-card-content {
    padding: 25px;
}

/* Test Results Styles */
.pn-wph-test-results h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.pn-wph-test-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pn-wph-test-category {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pn-wph-category-name {
    min-width: 120px;
    font-weight: 500;
    color: #555;
    text-transform: capitalize;
}

.pn-wph-score-bar {
    flex: 1;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.pn-wph-score-fill {
    height: 100%;
    background: var(--pn-wph-color-main-0);
    border-radius: 6px;
    transition: width 0.8s ease;
    width: 0; /* Inicialmente sin ancho */
}

.pn-wph-score-value {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    color: var(--pn-wph-color-main-0);
    font-size: 1.1rem;
}

/* No Results Styles */
.pn-wph-no-results {
    text-align: center;
    padding: 30px 20px;
}

.pn-wph-no-results p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.pn-wph-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--pn-wph-color-main-0);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.pn-wph-btn:hover {
    background: var(--pn-wph-color-main-0);
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.pn-wph-btn-primary {
    background: var(--pn-wph-color-main-0);
}

/* Achievements Styles */
.pn-wph-achievements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.pn-wph-achievement-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.pn-wph-achievement-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #a42d2d 0%, #ffa500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.pn-wph-achievement-info {
    display: flex;
    flex-direction: column;
}

.pn-wph-achievement-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.pn-wph-achievement-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Badges Showcase */
.pn-wph-badges-showcase h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.pn-wph-badges-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.pn-wph-badge-item {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pn-wph-badge-item:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Popup Styles */
.pn-wph-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pn-wph-popup-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.pn-wph-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #dee2e6;
}

.pn-wph-popup-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #333;
}

.pn-wph-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.pn-wph-popup-close:hover {
    background: #f8f9fa;
    color: #333;
}

.pn-wph-popup-body {
    padding: 25px;
}

.pn-wph-setting-group {
    margin-bottom: 25px;
}

.pn-wph-setting-group h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

.pn-wph-setting-item {
    margin-bottom: 15px;
}

.pn-wph-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.pn-wph-checkbox-label input[type="checkbox"] {
    margin: 0;
    margin-top: 2px;
}

.pn-wph-checkbox-text {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.4;
}

.pn-wph-setting-item input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.95rem;
}

.pn-wph-popup-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.pn-wph-btn-danger {
    background: #dc3232 !important;
}

.pn-wph-btn-danger:hover {
    background: #c92626 !important;
}

/* Message Styles */
.pn-wph-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: none;
}

.pn-wph-message-success {
    background: #28a745;
}

.pn-wph-message-error {
    background: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pn-wph-family-page {
        padding: 15px;
    }
    
    .pn-wph-family-header h1 {
        font-size: 2rem;
    }
    
    .pn-wph-family-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 100%;
    }
    
    .pn-wph-card-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .pn-wph-avatar-container {
        margin: 0 0 15px 0;
    }
    
    .pn-wph-achievements {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pn-wph-badges-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .pn-wph-test-category {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .pn-wph-category-name {
        min-width: auto;
    }
    
    .pn-wph-score-bar {
        width: 100%;
    }
    
    /* Mobile adjustments for action buttons */
    .pn-wph-child-actions {
        top: 10px;
        right: 10px;
        gap: 6px;
    }
    
    .pn-wph-action-btn {
        width: 32px;
        height: 32px;
    }
    
    .pn-wph-action-btn i {
        font-size: 16px;
    }
    
    /* Mobile popup adjustments */
    .pn-wph-popup-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .pn-wph-popup-body {
        padding: 20px;
    }
    
    .pn-wph-popup-actions {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .pn-wph-family-header {
        padding: 20px 15px;
    }
    
    .pn-wph-family-header h1 {
        font-size: 1.8rem;
    }
    
    .pn-wph-card-content {
        padding: 20px 15px;
    }
    
    .pn-wph-achievement-item {
        padding: 15px;
    }
    
    .pn-wph-achievement-value {
        font-size: 1.5rem;
    }
}
