/* Divine School Management - Public Styles */

/* Hide header and footer on parent dashboard page */
.dsm-parent-dashboard-page header,
.dsm-parent-dashboard-page .site-header,
.dsm-parent-dashboard-page .site-footer,
.dsm-parent-dashboard-page footer,
.dsm-parent-dashboard-page #header,
.dsm-parent-dashboard-page #footer,
.dsm-parent-dashboard-page .header,
.dsm-parent-dashboard-page .footer,
.dsm-parent-dashboard-page .main-header,
.dsm-parent-dashboard-page .main-footer,
.dsm-parent-dashboard-page .page-header,
.dsm-parent-dashboard-page .page-footer,
.dsm-parent-dashboard-page #masthead,
.dsm-parent-dashboard-page #colophon,
.dsm-parent-dashboard-page .entry-header,
.dsm-parent-dashboard-page .entry-footer,
.dsm-parent-dashboard-page .nav-menu,
.dsm-parent-dashboard-page .main-navigation,
.dsm-parent-dashboard-page #wpadminbar {
    display: none !important;
}

/* Full page layout for parent dashboard */
.dsm-parent-dashboard-page {
    margin: 0 !important;
    padding: 0 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.dsm-parent-dashboard-page .site-content,
.dsm-parent-dashboard-page .content-area,
.dsm-parent-dashboard-page #content,
.dsm-parent-dashboard-page #main,
.dsm-parent-dashboard-page .site-main,
.dsm-parent-dashboard-page article,
.dsm-parent-dashboard-page .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Category Report Styles */
.dsm-category-report {
    margin-top: 30px;
}

/* Category Tabs Styles */
.dsm-category-tabs {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.dsm-category-tab-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e9ecef;
    flex-wrap: wrap;
    padding-bottom: 0;
}

.dsm-category-tab-nav li {
    margin: 0;
}

.dsm-category-tab-nav a {
    display: block;
    padding: 10px 18px;
    text-decoration: none;
    color: #666;
    background: transparent;
    border: 2px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.dsm-category-tab-nav a:hover {
    background: #f8f9fa;
    color: #333;
}

.dsm-category-tab-nav li.active a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 -3px 10px rgba(102, 126, 234, 0.2);
}

.dsm-category-tab-content {
    padding: 0;
    background: transparent;
    border: none;
}

.dsm-category-panel {
    display: none;
}

.dsm-category-panel.active {
    display: block;
}

.dsm-category-panel h4 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
    margin-bottom: 10px;
}

.dsm-category-panel p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.dsm-category-stats {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.dsm-category-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.dsm-category-stat-row:last-child {
    border-bottom: none;
}

.dsm-category-stat-row .dsm-label {
    font-weight: 600;
    color: #495057;
}

.dsm-category-stat-row .dsm-value {
    color: #007cba;
    font-weight: bold;
}

/* Timeline Heading */
.dsm-timeline-heading {
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

/* Parent Dashboard Container */
.dsm-parent-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    background: transparent;
}

.dsm-parent-dashboard > h2 {
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Dashboard Header */
.dsm-dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.dsm-dashboard-title {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    order: 1;
    flex: 0 0 auto;
}

.dsm-dashboard-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    order: 2;
    margin-left: auto;
}


.dsm-logout-link {
    background: #ff4757;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dsm-logout-link:hover {
    background: #ff3838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3);
}

/* Override WordPress theme's constrained layout */
.is-layout-constrained > .dsm-parent-dashboard,
.is-layout-constrained > .dsm-parent-dashboard-wrapper,
.is-layout-constrained > .dsm-login-wrapper {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Remove theme's content size constraints for our plugin elements */
.is-layout-constrained > :where(.dsm-parent-dashboard):not(.alignleft):not(.alignright):not(.alignfull),
.is-layout-constrained > :where(.dsm-parent-dashboard-wrapper):not(.alignleft):not(.alignright):not(.alignfull),
.is-layout-constrained > :where(.dsm-login-wrapper):not(.alignleft):not(.alignright):not(.alignfull) {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Dashboard Box Card Style */
.dsm-dashboard-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.dsm-dashboard-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, -30px); }
}

.dsm-dashboard-box h2 {
    color: #fff !important;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.dsm-dashboard-box p {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 16px;
    margin: 0 !important;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.dsm-notice {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

/* Student Tabs */
.dsm-student-tabs {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.dsm-tab-nav {
    list-style: none;
    margin: 0 0 30px 0;
    padding: 0;
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0;
}

.dsm-tab-nav li {
    margin: 0;
}

.dsm-tab-nav li a {
    display: block;
    padding: 12px 24px;
    text-decoration: none;
    color: #666;
    background: transparent;
    border: 2px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.dsm-tab-nav li.active a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 -5px 15px rgba(102, 126, 234, 0.3);
}

.dsm-tab-nav li a:hover:not(.dsm-tab-nav li.active a) {
    background: #f8f9fa;
    color: #333;
}

.dsm-tab-content {
    background: transparent;
    border: none;
    padding: 0;
}

.dsm-student-panel {
    display: none;
}

.dsm-student-panel.active {
    display: block;
}

/* Student Stats */
.dsm-student-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dsm-stat-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.dsm-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.dsm-stat-card.dsm-presented {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: rgba(33, 150, 243, 0.2);
}

.dsm-stat-card.dsm-developed {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe082 100%);
    border-color: rgba(255, 193, 7, 0.2);
}

.dsm-stat-card.dsm-refined {
    background: linear-gradient(135deg, #d4edda 0%, #a5d6a7 100%);
    border-color: rgba(76, 175, 80, 0.2);
}

.dsm-stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dsm-stat-label {
    display: block;
    font-size: 14px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Timeline Styles */
.dsm-timeline {
    position: relative;
    padding-left: 40px;
}

.dsm-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.dsm-timeline-item {
    position: relative;
    margin-bottom: 35px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dsm-timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    z-index: 1;
}

.dsm-timeline-date {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dsm-timeline-content {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.dsm-timeline-content:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.dsm-activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.dsm-activity-header h4 {
    margin: 0;
    font-size: 18px;
}

/* Status Badge Styles */
.dsm-status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.dsm-status-presented {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.dsm-status-developed {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe082 100%);
    color: #f57c00;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.dsm-status-refined {
    background: linear-gradient(135deg, #d4edda 0%, #a5d6a7 100%);
    color: #2e7d32;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

/* Category Badge */
.dsm-category-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.dsm-category-badge.dsm-uncategorized {
    background: linear-gradient(135deg, #868e96 0%, #495057 100%);
    box-shadow: 0 2px 8px rgba(134, 142, 150, 0.2);
}

.dsm-activity-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Activity Photo */
.dsm-activity-photo {
    margin-top: 10px;
}

.dsm-activity-photo img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Login Form Styles */
.dsm-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    padding: 40px 20px;
}

.dsm-login-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.dsm-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.dsm-login-header h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
}

.dsm-login-header p {
    color: #666;
    font-size: 16px;
}

.dsm-login-form {
    margin-top: 30px;
}

.dsm-form-group {
    margin-bottom: 20px;
}

.dsm-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.dsm-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.dsm-form-control:focus {
    outline: none;
    border-color: #4CAF50;
}

.dsm-form-check label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.dsm-form-check input[type="checkbox"] {
    margin-right: 8px;
}

.dsm-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.dsm-btn-primary {
    background-color: #4CAF50;
    color: white;
}

.dsm-btn-primary:hover {
    background-color: #45a049;
}

.dsm-btn-block {
    display: block;
    width: 100%;
}

.dsm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dsm-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsm-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.dsm-form-footer {
    text-align: center;
    margin-top: 20px;
}

.dsm-forgot-password {
    color: #4CAF50;
    text-decoration: none;
    font-size: 14px;
}

.dsm-forgot-password:hover {
    text-decoration: underline;
}

.dsm-form-messages {
    margin-bottom: 20px;
}

.dsm-alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.dsm-alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.dsm-alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Responsive - Tablet (768px to 1199px) */
@media screen and (max-width: 1199px) {
    .dsm-parent-dashboard {
        max-width: 100%;
        padding: 20px;
    }
    
    /* Override theme constraints on tablet */
    .is-layout-constrained > .dsm-parent-dashboard,
    .is-layout-constrained > .dsm-parent-dashboard-wrapper,
    .is-layout-constrained > .dsm-login-wrapper {
        max-width: 100% !important;
    }
}

/* Responsive - Mobile (up to 768px) */
@media screen and (max-width: 768px) {
    .dsm-parent-dashboard {
        padding: 20px 15px;
    }
    
    .dsm-dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .dsm-dashboard-title {
        font-size: 24px;
    }
    
    .dsm-student-tabs {
        padding: 20px;
    }
    
    .dsm-tab-nav {
        flex-direction: column;
        gap: 5px;
    }
    
    .dsm-tab-nav li a {
        width: 100%;
        text-align: center;
        border-radius: 8px;
        bottom: 0;
    }
    
    .dsm-tab-nav li.active a {
        bottom: 0;
    }
    
    .dsm-category-tab-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .dsm-category-tab-nav a {
        white-space: nowrap;
    }
    
    .dsm-student-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .dsm-stat-card {
        padding: 20px 15px;
    }
    
    .dsm-stat-number {
        font-size: 28px;
    }
    
    .dsm-timeline {
        padding-left: 30px;
    }
    
    .dsm-timeline::before {
        left: 10px;
    }
    
    .dsm-timeline-item::before {
        left: -23px;
        width: 14px;
        height: 14px;
    }
    
    .dsm-activity-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .dsm-activity-meta {
        flex-wrap: wrap;
    }
}

/* Responsive - Small Mobile (up to 480px) */
@media screen and (max-width: 480px) {
    .dsm-parent-dashboard {
        padding: 10px;
    }
    
    .dsm-student-stats {
        grid-template-columns: 1fr;
    }
    
    .dsm-activity-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dsm-status-badge {
        margin-top: 5px;
    }
    
    .dsm-login-container {
        padding: 30px 20px;
    }
    
    .dsm-login-header h2 {
        font-size: 24px;
    }
}

/* Photo Gallery Styles */
.dsm-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.dsm-gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
}

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

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

.dsm-gallery-item .photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px;
    font-size: 12px;
    margin: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dsm-gallery-item:hover .photo-caption {
    opacity: 1;
}

/* Lightbox styles */
.dsm-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    cursor: pointer;
}

.dsm-lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

.dsm-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
}

.dsm-lightbox-caption {
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 14px;
}

.dsm-lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.dsm-lightbox-close:hover {
    color: #ccc;
}

.dsm-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
}

.dsm-lightbox-prev {
    left: 20px;
}

.dsm-lightbox-next {
    right: 20px;
}

.dsm-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Activity Comment Styles */
.dsm-activity-comment {
    margin-top: 12px;
    padding: 10px 12px;
    background-color: #f8f9fa;
    border-left: 3px solid #667eea;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
}

.dsm-activity-comment strong {
    color: #667eea;
    margin-right: 5px;
    font-weight: 600;
}
