/**
 * Public-facing styles for the Checklist Ecommerce B2B
 * Version 2.3.0 - Flexbox Force & Hash Security
 */

:root {
    --b2r-primary: #28a745 !important;
    --b2r-consultancy: #e16f00 !important;
    --b2r-border-radius: 10px !important;
}

/* Wrapper */
.b2r-checklist-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #333;
}

/* Grid Layout */
#b2r-checklist-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    #b2r-checklist-form { grid-template-columns: 1fr; }
}

/* Action Container - Force Side by Side */
body .b2r-checklist-wrapper .b2r-action-container {
    grid-column: 1 / -1;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
    margin-top: 30px !important;
    flex-wrap: nowrap !important; /* Impede quebra de linha se houver espaço */
}

@media (max-width: 600px) {
    body .b2r-checklist-wrapper .b2r-action-container {
        flex-direction: column !important;
        gap: 10px !important;
    }
}

/* Buttons - High Specificity Force */
body .b2r-checklist-wrapper .b2r-btn-primary,
body .b2r-checklist-wrapper #b2r-submit-checklist {
    background-color: #28a745 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 15px 25px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2) !important;
    text-transform: none !important;
    display: inline-block !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    margin: 0 !important;
}

body .b2r-checklist-wrapper .b2r-btn-consultancy {
    background-color: #e16f00 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 15px 25px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    box-shadow: 0 4px 15px rgba(225, 111, 0, 0.2) !important;
    text-decoration: none !important;
    display: inline-block !important;
    text-transform: none !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

body .b2r-checklist-wrapper .b2r-btn-primary:hover,
body .b2r-checklist-wrapper .b2r-btn-consultancy:hover {
    transform: translateY(-2px) !important;
    opacity: 0.9 !important;
    color: #ffffff !important;
}

/* Progress Bar */
.b2r-progress-bar {
    height: 12px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.b2r-progress-fill {
    height: 100%;
    background: #28a745;
    transition: width 0.4s ease;
}

/* Pillar & Items */
.b2r-checklist-pillar {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
}

.b2r-checklist-pillar h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #1a1a1a;
    border-bottom: 2px solid #28a745;
    display: inline-block;
    padding-bottom: 5px;
}

.b2r-checklist-items { list-style: none; padding: 0; margin: 0; }
.b2r-checklist-items li { margin-bottom: 12px; }

/* Custom Checkbox */
.b2r-checkbox-container {
    display: block;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    font-size: 15px;
    user-select: none;
    line-height: 1.4;
}

.b2r-checkbox-container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }

.b2r-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
}

.b2r-checkbox-container input:checked ~ .b2r-checkmark {
    background-color: #28a745;
    border-color: #28a745;
}

.b2r-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.b2r-checkbox-container input:checked ~ .b2r-checkmark:after {
    display: block;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Modal */
.b2r-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.b2r-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.b2r-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
}

.b2r-form-group input:focus {
    border-color: #28a745;
    outline: none;
}
