/**
 * Sponsor-A-Child Child Page Styles
 * Version 2.0.0
 */

/* Child Profile Container */
.sac-child-profile {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Section */
.sac-child-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.sac-child-photo-main {
    flex-shrink: 0;
    width: 250px;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.sac-child-photo-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sac-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #e0e0e0;
}

.sac-photo-placeholder .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: #999;
}

.sac-child-header-info {
    flex: 1;
}

.sac-child-header-info h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    color: #333;
}

.sac-child-id-badge {
    display: inline-block;
    font-family: monospace;
    font-size: 14px;
    background: #2271b1;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.sac-child-quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.sac-child-quick-stats .sac-stat {
    background: #f5f5f5;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.sac-ministry-name {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.sac-ministry-name .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 5px;
}

/* Meta Bar for Single Child Page (when header is hidden) */
.sac-child-meta-bar {
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #2271b1;
}

.sac-child-meta-bar .sac-child-quick-stats {
    margin-bottom: 0;
}

/* Public/Guest View Styles */
.sac-child-public {
    display: flex;
    gap: 25px;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 30px;
}

.sac-child-public .sac-child-photo {
    flex-shrink: 0;
    width: 150px;
    height: 180px;
    border-radius: 6px;
    overflow: hidden;
}

.sac-child-public .sac-child-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sac-child-public .sac-child-info {
    flex: 1;
}

.sac-child-public h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    border: none;
    padding: 0;
}

.sac-child-details {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.sac-child-details li {
    font-size: 14px;
    color: #666;
}

.sac-sponsor-cta {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.sac-login-prompt {
    margin-top: 15px;
    font-size: 13px;
    color: #888;
}

/* Section Styling */
.sac-child-section {
    margin-bottom: 40px;
}

.sac-child-section h2 {
    font-size: 22px;
    margin: 0 0 20px 0;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.sac-child-section h3 {
    font-size: 18px;
    margin: 20px 0 15px 0;
    color: #444;
}

/* About Section */
.sac-child-bio {
    line-height: 1.7;
    color: #444;
}

.sac-public-notes {
    margin-top: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
}

/* Get to Know Me Questions */
.sac-questions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.sac-question-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
}

.sac-question-card h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.sac-question-card p {
    margin: 0;
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .sac-questions-grid {
        grid-template-columns: 1fr;
    }
}

/* Info Table */
.sac-info-table {
    width: 100%;
    border-collapse: collapse;
}

.sac-info-table tr {
    border-bottom: 1px solid #eee;
}

.sac-info-table th,
.sac-info-table td {
    padding: 12px 15px;
    text-align: left;
}

.sac-info-table th {
    width: 180px;
    font-weight: 600;
    color: #555;
    background: #fafafa;
}

/* Internal Notes (Staff Only) */
.sac-internal-notes {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
}

.sac-internal-notes h2 {
    border-bottom-color: #ffc107;
}

.sac-internal-notes h2 .dashicons {
    color: #856404;
    vertical-align: middle;
    margin-right: 8px;
}

.sac-notes-content {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    line-height: 1.6;
}

/* Documents Section */
.sac-documents-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sac-document-group h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.sac-doc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sac-doc-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 8px;
}

.sac-doc-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.sac-doc-icon.pdf::before { content: "PDF"; font-size: 10px; font-weight: bold; color: #d63638; }
.sac-doc-icon.image::before { content: "IMG"; font-size: 10px; font-weight: bold; color: #00a32a; }
.sac-doc-icon.doc::before { content: "DOC"; font-size: 10px; font-weight: bold; color: #2271b1; }
.sac-doc-icon.xls::before { content: "XLS"; font-size: 10px; font-weight: bold; color: #155724; }
.sac-doc-icon.file::before { content: "FILE"; font-size: 9px; font-weight: bold; color: #666; }

.sac-doc-details {
    flex: 1;
}

.sac-doc-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}

.sac-doc-link:hover {
    text-decoration: underline;
}

.sac-doc-date {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 3px;
}

.sac-no-documents,
.sac-no-photos {
    color: #888;
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Photo Gallery */
.sac-photo-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.sac-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.sac-gallery-link {
    display: block;
    width: 100%;
    height: 100%;
}

.sac-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sac-gallery-item:hover img {
    transform: scale(1.05);
}

.sac-photo-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
}

@media (max-width: 768px) {
    .sac-photo-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .sac-photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Education History */
.sac-education-history {
    margin-top: 25px;
}

.sac-education-history table {
    width: 100%;
    border-collapse: collapse;
}

.sac-education-history th,
.sac-education-history td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.sac-education-history th {
    background: #f5f5f5;
    font-weight: 600;
    font-size: 13px;
}

.sac-education-history tr.current {
    background: #f0f7ff;
}

.sac-current-badge {
    display: inline-block;
    background: #2271b1;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
}

/* Status Badges */
.sac-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.sac-status-badge.sponsored,
.sac-status-badge.active,
.sac-status-badge.approved {
    background: #d4edda;
    color: #155724;
}

.sac-status-badge.waiting,
.sac-status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.sac-status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Actions Section */
.sac-actions-section {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
}

.sac-action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Access Denied */
.sac-access-denied {
    text-align: center;
    padding: 60px 20px;
    max-width: 500px;
    margin: 40px auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.sac-access-denied h2 {
    margin: 0 0 15px 0;
}

.sac-access-denied p {
    color: #666;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .sac-child-header {
        flex-direction: column;
        text-align: center;
    }

    .sac-child-photo-main {
        width: 200px;
        height: 240px;
        margin: 0 auto;
    }

    .sac-child-quick-stats {
        justify-content: center;
    }

    .sac-info-table th {
        width: 120px;
    }
}
