/* MO4 LGPD Banner Styles */

/* Variables - can be overridden */
:root {
    --mo4-lgpd-primary: #0073aa;
    --mo4-lgpd-primary-hover: #005177;
    --mo4-lgpd-bg: #ffffff;
    --mo4-lgpd-text: #1d2327;
    --mo4-lgpd-text-muted: #646970;
    --mo4-lgpd-border: #c3c4c7;
    --mo4-lgpd-success: #00a32a;
    --mo4-lgpd-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    --mo4-lgpd-radius: 8px;
    --mo4-lgpd-z-index: 999999;
}

/* Banner Container */
.mo4-lgpd-banner {
    position: fixed;
    left: 0;
    right: 0;
    background: var(--mo4-lgpd-bg);
    box-shadow: var(--mo4-lgpd-shadow);
    z-index: var(--mo4-lgpd-z-index);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--mo4-lgpd-text);
    box-sizing: border-box;
    overflow: hidden;
}

.mo4-lgpd-banner *,
.mo4-lgpd-banner *::before,
.mo4-lgpd-banner *::after {
    box-sizing: border-box;
}

.mo4-lgpd-banner--bottom {
    bottom: 0;
}

.mo4-lgpd-banner--top {
    top: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.mo4-lgpd-banner--bottom-left,
.mo4-lgpd-banner--bottom-right {
    bottom: 20px;
    left: auto;
    right: auto;
    max-width: 400px;
    border-radius: var(--mo4-lgpd-radius);
    margin: 20px;
}

.mo4-lgpd-banner--bottom-left {
    left: 0;
}

.mo4-lgpd-banner--bottom-right {
    right: 0;
}

.mo4-lgpd-banner__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.mo4-lgpd-banner--bottom-left .mo4-lgpd-banner__container,
.mo4-lgpd-banner--bottom-right .mo4-lgpd-banner__container {
    flex-direction: column;
    align-items: stretch;
}

.mo4-lgpd-banner__content {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.mo4-lgpd-banner__title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--mo4-lgpd-text);
}

.mo4-lgpd-banner__description {
    margin: 0;
    color: var(--mo4-lgpd-text-muted);
}

.mo4-lgpd-banner__description a {
    color: var(--mo4-lgpd-primary);
    text-decoration: underline;
}

.mo4-lgpd-banner__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Buttons */
.mo4-lgpd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.mo4-lgpd-btn--primary {
    background: var(--mo4-lgpd-primary);
    color: #fff;
    border-color: var(--mo4-lgpd-primary);
}

.mo4-lgpd-btn--primary:hover {
    background: var(--mo4-lgpd-primary-hover);
    border-color: var(--mo4-lgpd-primary-hover);
}

.mo4-lgpd-btn--secondary {
    background: #f6f7f7;
    color: var(--mo4-lgpd-text);
    border-color: var(--mo4-lgpd-border);
}

.mo4-lgpd-btn--secondary:hover {
    background: #e9ecef;
}

.mo4-lgpd-btn--outline {
    background: transparent;
    color: var(--mo4-lgpd-text);
    border-color: var(--mo4-lgpd-border);
}

.mo4-lgpd-btn--outline:hover {
    background: #f6f7f7;
}

/* Modal */
.mo4-lgpd-modal {
    position: fixed;
    inset: 0;
    z-index: calc(var(--mo4-lgpd-z-index) + 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mo4-lgpd-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.mo4-lgpd-modal__content {
    position: relative;
    background: var(--mo4-lgpd-bg);
    border-radius: var(--mo4-lgpd-radius);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.mo4-lgpd-modal__header {
    padding: 20px;
    border-bottom: 1px solid var(--mo4-lgpd-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mo4-lgpd-modal__header h2 {
    margin: 0;
    font-size: 20px;
}

.mo4-lgpd-modal__close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--mo4-lgpd-text-muted);
    padding: 0;
    line-height: 1;
}

.mo4-lgpd-modal__close:hover {
    color: var(--mo4-lgpd-text);
}

.mo4-lgpd-modal__body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.mo4-lgpd-modal__body > p {
    margin-top: 0;
    color: var(--mo4-lgpd-text-muted);
}

.mo4-lgpd-modal__footer {
    padding: 20px;
    border-top: 1px solid var(--mo4-lgpd-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* DPO Info */
.mo4-lgpd-modal__dpo {
    margin-top: 15px;
    padding: 10px 12px;
    background: #f6f7f7;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--mo4-lgpd-text-muted);
}

.mo4-lgpd-modal__dpo strong {
    font-weight: 600;
    color: var(--mo4-lgpd-text);
}

.mo4-lgpd-modal__dpo a {
    color: var(--mo4-lgpd-primary);
    text-decoration: none;
}

.mo4-lgpd-modal__dpo a:hover {
    text-decoration: underline;
}

/* Category */
.mo4-lgpd-category {
    border: 1px solid var(--mo4-lgpd-border);
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}

.mo4-lgpd-category:last-child {
    margin-bottom: 0;
}

.mo4-lgpd-category__header {
    padding: 15px;
    background: #f6f7f7;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.mo4-lgpd-category__info {
    flex: 1;
}

.mo4-lgpd-category__title {
    margin: 0 0 5px 0;
    font-size: 15px;
    font-weight: 600;
}

.mo4-lgpd-category__description {
    margin: 0;
    font-size: 13px;
    color: var(--mo4-lgpd-text-muted);
}

/* Toggle Switch */
.mo4-lgpd-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.mo4-lgpd-switch input[type="checkbox"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    z-index: 3;
    opacity: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.mo4-lgpd-switch input[type="checkbox"]:focus,
.mo4-lgpd-switch input[type="checkbox"]:active,
.mo4-lgpd-switch input[type="checkbox"]:checked {
    opacity: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.mo4-lgpd-switch .custom-checkbox,
.mo4-lgpd-modal .custom-checkbox {
    display: none !important;
    opacity: 0 !important;
}

.mo4-lgpd-switch input:checked ~ .mo4-lgpd-switch__slider {
    background-color: var(--mo4-lgpd-primary) !important;
}

.mo4-lgpd-switch input:checked ~ .mo4-lgpd-switch__slider:before {
    transform: translateX(24px);
}

.mo4-lgpd-switch__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #c3c4c7;
    transition: 0.3s;
    border-radius: 26px;
    z-index: 1;
}

.mo4-lgpd-switch__slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}


.mo4-lgpd-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Cookies List */
.mo4-lgpd-category__cookies {
    border-top: 1px solid var(--mo4-lgpd-border);
}

.mo4-lgpd-category__expand {
    width: 100%;
    padding: 10px 15px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    color: var(--mo4-lgpd-primary);
}

.mo4-lgpd-category__expand:hover {
    background: #f0f0f0;
}

.mo4-lgpd-cookies-list {
    padding: 15px;
    background: #fff;
}

.mo4-lgpd-cookies-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.mo4-lgpd-cookies-table th,
.mo4-lgpd-cookies-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid var(--mo4-lgpd-border);
}

.mo4-lgpd-cookies-table th {
    font-weight: 600;
    background: #f6f7f7;
}

/* Revoke Button */
.mo4-lgpd-revoke-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--mo4-lgpd-bg);
    border: 1px solid var(--mo4-lgpd-border);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: calc(var(--mo4-lgpd-z-index) - 1);
    transition: all 0.2s ease;
}

.mo4-lgpd-revoke-btn:hover {
    background: #f6f7f7;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .mo4-lgpd-banner {
        font-size: 13px;
    }

    .mo4-lgpd-banner__container {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 15px;
    }

    .mo4-lgpd-banner__content {
        min-width: 0;
        width: 100%;
    }

    .mo4-lgpd-banner__title {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .mo4-lgpd-banner__description {
        font-size: 13px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .mo4-lgpd-banner__actions {
        flex-direction: column;
        width: 100%;
    }

    .mo4-lgpd-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }

    .mo4-lgpd-modal {
        padding: 10px;
    }

    .mo4-lgpd-modal__content {
        max-height: 100vh;
        border-radius: 8px;
        margin: 0;
    }

    .mo4-lgpd-modal__header {
        padding: 15px;
    }

    .mo4-lgpd-modal__header h2 {
        font-size: 18px;
    }

    .mo4-lgpd-modal__body {
        padding: 15px;
    }

    .mo4-lgpd-modal__body > p {
        font-size: 13px;
    }

    .mo4-lgpd-modal__footer {
        padding: 15px;
        flex-direction: column;
    }

    .mo4-lgpd-modal__footer .mo4-lgpd-btn {
        width: 100%;
    }

    .mo4-lgpd-category {
        margin-bottom: 12px;
    }

    .mo4-lgpd-category__header {
        flex-direction: column;
        padding: 12px;
        gap: 10px;
    }

    .mo4-lgpd-category__title {
        font-size: 14px;
    }

    .mo4-lgpd-category__description {
        font-size: 12px;
    }

    .mo4-lgpd-category__toggle {
        align-self: flex-start;
    }

    .mo4-lgpd-revoke-btn {
        bottom: 10px;
        left: 10px;
        padding: 6px 12px;
        font-size: 11px;
    }

    /* Banner posições laterais em mobile */
    .mo4-lgpd-banner--bottom-left,
    .mo4-lgpd-banner--bottom-right {
        left: 0;
        right: 0;
        bottom: 0;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .mo4-lgpd-banner__container {
        padding: 12px;
    }

    .mo4-lgpd-banner__title {
        font-size: 15px;
    }

    .mo4-lgpd-banner__description {
        font-size: 12px;
    }

    .mo4-lgpd-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .mo4-lgpd-cookies-table {
        font-size: 10px;
    }

    .mo4-lgpd-cookies-table th,
    .mo4-lgpd-cookies-table td {
        padding: 5px;
    }
}

/* Animation */
@keyframes mo4-lgpd-slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes mo4-lgpd-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.mo4-lgpd-banner {
    animation: mo4-lgpd-slide-up 0.4s ease;
}

.mo4-lgpd-modal {
    animation: mo4-lgpd-fade-in 0.3s ease;
}

/* =====================
   REQUEST FORM (Shortcode)
   ===================== */

.mo4-lgpd-request-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mo4-lgpd-request-form-header {
    margin-bottom: 30px;
}

.mo4-lgpd-request-form-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.mo4-lgpd-request-form-header p {
    color: #646970;
    margin: 0;
}

.mo4-lgpd-request-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
}

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

.mo4-lgpd-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #1d2327;
}

.mo4-lgpd-form-group input,
.mo4-lgpd-form-group select,
.mo4-lgpd-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.mo4-lgpd-form-group input:focus,
.mo4-lgpd-form-group select:focus,
.mo4-lgpd-form-group textarea:focus {
    outline: none;
    border-color: var(--mo4-lgpd-primary, #0073aa);
    box-shadow: 0 0 0 1px var(--mo4-lgpd-primary, #0073aa);
}

.mo4-lgpd-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .mo4-lgpd-form-row {
        grid-template-columns: 1fr;
    }
}

.mo4-lgpd-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #646970;
}

.mo4-lgpd-type-descriptions p {
    margin: 10px 0 0;
    padding: 10px;
    background: #f0f6fc;
    border-radius: 4px;
    font-size: 13px;
    color: #1d2327;
}

.mo4-lgpd-form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.mo4-lgpd-form-checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
}

.mo4-lgpd-form-checkbox label {
    font-weight: normal;
    font-size: 13px;
    line-height: 1.5;
}

.mo4-lgpd-form-checkbox a {
    color: var(--mo4-lgpd-primary, #0073aa);
}

.mo4-lgpd-form-actions {
    margin-top: 25px;
}

.mo4-lgpd-form-actions .mo4-lgpd-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
}

.mo4-lgpd-form-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.mo4-lgpd-form-message--error {
    background: #fcf0f1;
    border: 1px solid #d63638;
    color: #d63638;
}

.mo4-lgpd-form-message--success {
    background: #edfaef;
    border: 1px solid #00a32a;
    color: #00a32a;
}

.mo4-lgpd-request-form-footer {
    margin-top: 20px;
    padding: 15px;
    background: #f6f7f7;
    border-radius: 4px;
    font-size: 13px;
}

/* Success/Error Messages */
.mo4-lgpd-message {
    text-align: center;
    padding: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.mo4-lgpd-message__icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.mo4-lgpd-message--success .mo4-lgpd-message__icon {
    color: #00a32a;
}

.mo4-lgpd-message--error .mo4-lgpd-message__icon {
    color: #d63638;
}

.mo4-lgpd-message h2 {
    margin: 0 0 15px;
}

.mo4-lgpd-message p {
    margin: 0 0 10px;
    color: #646970;
}

.mo4-lgpd-message__note {
    margin-top: 20px !important;
    padding: 10px;
    background: #f6f7f7;
    border-radius: 4px;
    font-size: 13px;
}

.mo4-lgpd-message .mo4-lgpd-btn {
    margin-top: 25px;
}
