Files
shopify-ai-backup/chat/templates/FAQ Manager/public/css/public-style.css

442 lines
9.5 KiB
CSS

/* FAQ Manager Public Styles */
/* Custom CSS Variables */
:root {
--pc-faq-primary-color: #0073aa;
--pc-faq-secondary-color: #f1f1f1;
--pc-faq-text-color: #333;
--pc-faq-text-light: #666;
--pc-faq-border-color: #ddd;
--pc-faq-hover-color: #005a87;
--pc-faq-success-color: #46b450;
--pc-faq-background: #fff;
--pc-faq-spacing: 20px;
--pc-faq-border-radius: 6px;
--pc-faq-transition: all 0.3s ease;
--pc-faq-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
--pc-faq-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}
/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
:root {
--pc-faq-primary-color: #4fb3d9;
--pc-faq-secondary-color: #2c2c2c;
--pc-faq-text-color: #f0f0f0;
--pc-faq-text-light: #ccc;
--pc-faq-border-color: #555;
--pc-faq-hover-color: #6cc0e3;
--pc-faq-background: #1a1a1a;
--pc-faq-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
--pc-faq-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.5);
}
}
/* FAQ Container */
.pc-faq-container {
max-width: 900px;
margin: 0 auto;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
line-height: 1.6;
color: var(--pc-faq-text-color);
}
/* FAQ Header */
.pc-faq-header {
text-align: center;
margin-bottom: calc(var(--pc-faq-spacing) * 2);
padding: calc(var(--pc-faq-spacing) * 1.5);
background: linear-gradient(135deg, var(--pc-faq-primary-color) 0%, var(--pc-faq-hover-color) 100%);
color: white;
border-radius: var(--pc-faq-border-radius);
box-shadow: var(--pc-faq-shadow);
}
.pc-faq-title {
font-size: 2.5rem;
font-weight: 700;
margin: 0 0 10px 0;
line-height: 1.2;
}
.pc-faq-count {
font-size: 1.1rem;
opacity: 0.9;
font-weight: 300;
}
/* FAQ Items */
.pc-faq-items {
display: flex;
flex-direction: column;
gap: 15px;
}
.pc-faq-item {
background: var(--pc-faq-background);
border: 1px solid var(--pc-faq-border-color);
border-radius: var(--pc-faq-border-radius);
overflow: hidden;
transition: var(--pc-faq-transition);
box-shadow: var(--pc-faq-shadow);
}
.pc-faq-item:hover {
transform: translateY(-2px);
box-shadow: var(--pc-faq-shadow-hover);
border-color: var(--pc-faq-primary-color);
}
/* FAQ Question */
.pc-faq-question {
margin: 0;
}
.pc-faq-toggle {
width: 100%;
padding: 20px 25px;
background: none;
border: none;
text-align: left;
cursor: pointer;
font-size: 1.1rem;
font-weight: 600;
color: var(--pc-faq-text-color);
display: flex;
justify-content: space-between;
align-items: center;
transition: var(--pc-faq-transition);
position: relative;
}
.pc-faq-toggle:hover {
background: var(--pc-faq-secondary-color);
color: var(--pc-faq-primary-color);
}
.pc-faq-toggle:focus {
outline: 2px solid var(--pc-faq-primary-color);
outline-offset: -2px;
}
.pc-faq-question-text {
flex: 1;
padding-right: 15px;
line-height: 1.4;
}
/* Toggle Icon */
.pc-faq-toggle-icon {
position: relative;
width: 24px;
height: 24px;
flex-shrink: 0;
}
.pc-faq-plus,
.pc-faq-minus {
position: absolute;
background: var(--pc-faq-primary-color);
transition: var(--pc-faq-transition);
}
.pc-faq-plus {
width: 100%;
height: 2px;
top: 50%;
left: 0;
transform: translateY(-50%);
}
.pc-faq-minus {
width: 2px;
height: 100%;
top: 0;
left: 50%;
transform: translateX(-50%);
}
.pc-faq-item.is-open .pc-faq-minus {
opacity: 0;
transform: translateX(-50%) rotate(90deg);
}
.pc-faq-item.is-open .pc-faq-plus {
transform: translateY(-50%) rotate(90deg);
}
/* FAQ Answer */
.pc-faq-answer {
max-height: 0;
overflow: hidden;
transition: max-height 0.4s ease, padding 0.4s ease;
background: var(--pc-faq-secondary-color);
border-top: 1px solid var(--pc-faq-border-color);
}
.pc-faq-item.is-open .pc-faq-answer {
max-height: 1000px;
padding: 25px;
}
.pc-faq-answer-content {
color: var(--pc-faq-text-light);
font-size: 1rem;
line-height: 1.7;
}
.pc-faq-answer-content p:last-child {
margin-bottom: 0;
}
.pc-faq-answer-content h1,
.pc-faq-answer-content h2,
.pc-faq-answer-content h3,
.pc-faq-answer-content h4,
.pc-faq-answer-content h5,
.pc-faq-answer-content h6 {
color: var(--pc-faq-text-color);
margin-top: 20px;
margin-bottom: 15px;
}
.pc-faq-answer-content h1 { font-size: 1.8em; }
.pc-faq-answer-content h2 { font-size: 1.6em; }
.pc-faq-answer-content h3 { font-size: 1.4em; }
.pc-faq-answer-content h4 { font-size: 1.2em; }
.pc-faq-answer-content h5 { font-size: 1.1em; }
.pc-faq-answer-content h6 { font-size: 1em; }
.pc-faq-answer-content ul,
.pc-faq-answer-content ol {
margin: 15px 0;
padding-left: 25px;
}
.pc-faq-answer-content li {
margin-bottom: 8px;
}
.pc-faq-answer-content a {
color: var(--pc-faq-primary-color);
text-decoration: none;
border-bottom: 1px solid transparent;
transition: border-bottom-color 0.2s ease;
}
.pc-faq-answer-content a:hover {
border-bottom-color: var(--pc-faq-primary-color);
}
.pc-faq-answer-content blockquote {
margin: 20px 0;
padding: 15px 20px;
background: var(--pc-faq-background);
border-left: 4px solid var(--pc-faq-primary-color);
font-style: italic;
border-radius: 0 var(--pc-faq-border-radius) var(--pc-faq-border-radius) 0;
}
.pc-faq-answer-content code {
background: var(--pc-faq-background);
padding: 3px 6px;
border-radius: 3px;
font-family: 'Courier New', Courier, monospace;
font-size: 0.9em;
border: 1px solid var(--pc-faq-border-color);
}
.pc-faq-answer-content pre {
background: var(--pc-faq-background);
padding: 15px;
border-radius: var(--pc-faq-border-radius);
overflow-x: auto;
margin: 20px 0;
border: 1px solid var(--pc-faq-border-color);
}
.pc-faq-answer-content pre code {
background: none;
padding: 0;
border: none;
font-size: 0.9em;
}
.pc-faq-answer-content img {
max-width: 100%;
height: auto;
border-radius: var(--pc-faq-border-radius);
margin: 15px 0;
box-shadow: var(--pc-faq-shadow);
}
.pc-faq-answer-content table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
background: var(--pc-faq-background);
border-radius: var(--pc-faq-border-radius);
overflow: hidden;
}
.pc-faq-answer-content th,
.pc-faq-answer-content td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid var(--pc-faq-border-color);
}
.pc-faq-answer-content th {
background: var(--pc-faq-primary-color);
color: white;
font-weight: 600;
}
.pc-faq-answer-content tr:last-child td {
border-bottom: none;
}
/* Empty State */
.pc-faq-empty {
text-align: center;
padding: 60px 20px;
color: var(--pc-faq-text-light);
font-size: 1.1rem;
font-style: italic;
}
/* Accessibility */
.pc-faq-toggle[aria-expanded="true"] {
color: var(--pc-faq-primary-color);
font-weight: 700;
}
/* Focus visible for keyboard navigation */
.pc-faq-toggle:focus-visible {
outline: 3px solid var(--pc-faq-primary-color);
outline-offset: 2px;
}
/* Print Styles */
@media print {
.pc-faq-container {
max-width: none;
}
.pc-faq-item {
break-inside: avoid;
box-shadow: none;
border: 1px solid #333;
}
.pc-faq-answer {
display: block !important;
max-height: none !important;
padding: 20px !important;
}
.pc-faq-toggle-icon {
display: none;
}
}
/* Responsive Design */
@media screen and (max-width: 768px) {
.pc-faq-container {
margin: 0 15px;
}
.pc-faq-title {
font-size: 2rem;
}
.pc-faq-toggle {
padding: 15px 20px;
font-size: 1rem;
}
.pc-faq-item.is-open .pc-faq-answer {
padding: 20px;
}
.pc-faq-answer-content {
font-size: 0.95rem;
}
}
@media screen and (max-width: 480px) {
.pc-faq-header {
padding: 20px 15px;
margin-bottom: 30px;
}
.pc-faq-title {
font-size: 1.75rem;
}
.pc-faq-toggle {
padding: 12px 15px;
font-size: 0.95rem;
}
.pc-faq-question-text {
padding-right: 10px;
}
.pc-faq-toggle-icon {
width: 20px;
height: 20px;
}
.pc-faq-item.is-open .pc-faq-answer {
padding: 15px;
}
.pc-faq-answer-content {
font-size: 0.9rem;
}
}
/* Animation Enhancements */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.pc-faq-item {
animation: fadeIn 0.4s ease-out;
}
.pc-faq-item:nth-child(1) { animation-delay: 0.1s; }
.pc-faq-item:nth-child(2) { animation-delay: 0.2s; }
.pc-faq-item:nth-child(3) { animation-delay: 0.3s; }
.pc-faq-item:nth-child(4) { animation-delay: 0.4s; }
.pc-faq-item:nth-child(5) { animation-delay: 0.5s; }
/* RTL Support */
[dir="rtl"] .pc-faq-toggle {
text-align: right;
}
[dir="rtl"] .pc-faq-question-text {
padding-right: 0;
padding-left: 15px;
}
[dir="rtl"] .pc-faq-answer-content ul,
[dir="rtl"] .pc-faq-answer-content ol {
padding-left: 0;
padding-right: 25px;
}
[dir="rtl"] .pc-faq-answer-content blockquote {
border-left: none;
border-right: 4px solid var(--pc-faq-primary-color);
border-radius: var(--pc-faq-border-radius) 0 0 var(--pc-faq-border-radius);
}