/**
 * UFCLAS View Permission Plugin - Frontend Styles
 * 
 * Styles for restricted content display integrated with UF theme
 */

/* Integration with UF Theme Structure */
.fullwidth-text-block .ufclas-vp-restriction-message {
    margin-bottom: 25px;
}


/* Ensure proper spacing for WordPress blocks */
.wp-container-core-columns-is-layout-ufclas-vp {
    gap: 2em;
}

/* Group requirement styling that works with UF theme */
.ufclas-vp-group-requirement {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 15px 0;
    color: #856404;
    font-size: 0.95em;
}

/* UF Theme Button Integration */
.fullwidth-text-block .wp-block-buttons {
    margin: 20px 0;
}

/* Ensure UF theme button styles work properly */
.fullwidth-text-block .wp-block-button.is-style-animated-border .wp-block-button__link {
    /* Let the theme handle the styling, just ensure proper spacing */
    margin: 0;
}

/* Contact section styling that integrates with UF theme */
.fullwidth-text-block p a {
    color: #0073aa;
    text-decoration: none;
}

.fullwidth-text-block p a:hover {
    text-decoration: underline;
}

/* Legacy button support for fallback */
.ufclas-vp-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.ufclas-vp-btn-primary {
    background-color: #0073aa;
    color: white;
}

.ufclas-vp-btn-primary:hover {
    background-color: #005177;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* University of Florida Specific Styling */
.ufclas-vp-btn.ufclas-vp-gatorlink {
    background-color: #fa4616;
    color: white;
}

.ufclas-vp-btn.ufclas-vp-gatorlink:hover {
    background-color: #e63900;
    color: white;
}

/* Archive/Excerpt Restrictions */
.ufclas-vp-archive-restriction {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 16px;
    margin: 10px 0;
    color: #856404;
    font-style: italic;
}

/* Admin Preview Styles - Keep for admin functionality */
.ufclas-vp-admin-preview {
    background: #f0f8ff;
    border: 2px solid #0073aa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.ufclas-vp-admin-notice {
    background: #0073aa;
    color: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.ufclas-vp-admin-notice h3 {
    margin: 0 0 10px 0;
    color: white;
}

.ufclas-vp-admin-notice p {
    margin: 0;
}

.ufclas-vp-restricted-preview {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.ufclas-vp-restricted-preview h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.ufclas-vp-preview-content {
    opacity: 0.8;
}

/* Responsive Design - Integrate with UF theme responsive behavior */
@media (max-width: 768px) {
    .fullwidth-text-block .ufclas-vp-restriction-message p.intro {
        font-size: 1em;
    }
    
    .ufclas-vp-admin-preview {
        padding: 15px;
    }
    
    /* Legacy button responsive styles */
    .ufclas-vp-btn {
        padding: 10px 20px;
        font-size: 14px;
        display: block;
        width: 100%;
        margin: 10px 0;
        text-align: center;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .ufclas-vp-restricted-content {
        background: #2a2a2a;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .ufclas-vp-restriction-message {
        color: #ccc;
    }
    
    .ufclas-vp-contact-section {
        border-top-color: #555;
    }
    
    .ufclas-vp-contact-message {
        color: #bbb;
    }
    
    .ufclas-vp-group-requirement {
        background: #4a4a4a;
        border-color: #666;
        color: #ffd700;
    }
    
    .ufclas-vp-restricted-preview {
        background: #333;
        border-color: #555;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .ufclas-vp-restricted-content {
        border-width: 3px;
        border-color: #000;
    }
    
    .ufclas-vp-btn-primary {
        border: 2px solid #000;
    }
}

/* Print Styles */
@media print {
    .ufclas-vp-restricted-content {
        background: white !important;
        border: 2px solid black !important;
        color: black !important;
    }
    
    .ufclas-vp-btn {
        display: none;
    }
    
    .ufclas-vp-login-section {
        display: none;
    }
}

/* Focus Management */
.ufclas-vp-restricted-content:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Animation for Smooth Transitions */
.ufclas-vp-restricted-content {
    animation: ufclas-vp-fadeIn 0.5s ease-in-out;
}

@keyframes ufclas-vp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style adjustments for UF theme integration */
.fullwidth-text-block .ufclas-vp-restriction-message strong {
    color: inherit;
    font-weight: 700;
}

.fullwidth-text-block .ufclas-vp-restriction-message em {
    font-style: italic;
    opacity: 0.9;
}

/* Template override styles - ensure consistency regardless of page template */
.ufclas-vp-template-override #content {
    /* Remove any template-specific styling */
}

.ufclas-vp-template-override #primary {
    width: 100%;
    max-width: none;
}

.ufclas-vp-template-override #main {
    /* Ensure main content area is clean */
}

/* Fallback styles for legacy implementations */
.entry-content .ufclas-vp-restricted-content,
.post-content .ufclas-vp-restricted-content,
.page-content .ufclas-vp-restricted-content {
    margin: 2em auto;
    max-width: 600px;
} 