/*
 * Front‑end styles for the Interactive Progress Checklists plugin.
 *
 * These styles are adapted from the sample HTML and CSS provided by the user.
 * They define a container, grid layout, section styling and checkbox group
 * appearance. Feel free to customize colours and spacing to better fit
 * your theme. The plugin enqueues this stylesheet only on pages/posts
 * containing the [ipc_checklist] shortcode.
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

button {
    border-radius: unset;
}
/* Use a sans-serif font and a light background */
.ipc-checklist-container {
    font-family: Arial, sans-serif;
    background-color: #f0f8ff;
    padding: 20px;
    direction: rtl;
}

/* Container that wraps the checklist */
.ipc-checklist-container .container {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Content area */
.ipc-checklist-container .content {
    padding: 30px;
}

/* Grid for top‑level categories */
.ipc-checklist-container .sections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Individual category section */
.ipc-checklist-container .section {
    background-color: #e3f2fd;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #90caf9;
}

.ipc-checklist-container .section h3 {
    color: #1565c0;
    margin-bottom: 15px;
    font-size: 20px;
    text-align: center;
}

/* Checkbox groups (subcategory blocks) */
.ipc-checklist-container .checkbox-group {
    margin-bottom: 10px;
}

.ipc-checklist-container .checkbox-group input[type="checkbox"] {
    margin-left: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.ipc-checklist-container .checkbox-group label {
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

div.checkbox-group > label > strong {
   font-weight: bolder;
}

div.checkbox-group label {
   font-weight: normal;
}
/* Responsive design */
@media (max-width: 768px) {
    .ipc-checklist-container .sections-grid {
        grid-template-columns: 1fr;
    }
}

/* Accordion Styles for the checklist list view */
.ipc-accordion {
    margin-top: 20px;
}

.ipc-accordion .ipc-accordion-item {
    /*border: 1px solid #90caf9;*/
    border-radius: 5px;
    margin-bottom: 10px;
    overflow: hidden;
}

.ipc-accordion .ipc-accordion-header {
    background-color: #90caf9;
    color: #ffffff;
    padding: 12px 20px;
    font-size: 18px;
    cursor: pointer;
    border: none;
    text-align: right;
    width: 100%;
    outline: none;
}

.ipc-accordion .ipc-accordion-header.active {
    background-color: #1565c0;
}

.ipc-accordion .ipc-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #e3f2fd;
    padding: 0 20px;
}

.ipc-accordion .ipc-accordion-content ul {
    list-style: disc;
    margin-right: 20px;
    margin-top: 10px;
}

.ipc-accordion .ipc-accordion-content ul ul {
    margin-right: 20px;
    list-style: circle;
}

.ipc-accordion .ipc-accordion-content ul ul ul {
    margin-right: 20px;
    list-style: square;
}

.ipc-accordion .ipc-accordion-content a {
    display: inline-block;
    margin-top: 10px;
    color: #1565c0;
    text-decoration: underline;
}

/* Toggle button for showing/hiding a checklist */
.ipc-checklist-toggle {
    margin: 10px auto 20px;
    display: block;
    padding: 8px 16px;
    background-color: #1565c0;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
}

.ipc-checklist-toggle:hover {
    background-color: #0d47a1;
}

/* Title style for individual checklist view */
.ipc-checklist-title {
    text-align: center;
    margin-bottom: 20px;
    color: #1565c0;
    font-size: 24px;
}
