/*
 * Layout for frpc2/CookieConsentGdpr. Self-contained and free of nesting: it has to hold up on its
 * own, on pages that load no other stylesheet from this library.
 */
.cc-consent {
    .modal-dialog {
        max-width:720px;
    }

    .cc-consent-body {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .cc-consent-links {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    /* Refusing and accepting are the same weight on purpose. A prominent "accept" beside a quiet
       "reject" is the dark pattern the regulation is about, and it is one CSS change away. */
    .cc-consent-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cc-consent-actions .btn {
        width: 100%;
    }
    
    .cc-consent-preferences {
        border-top: 1px solid rgba(0, 0, 0, 0.125);
        padding-top: 1rem;
    }
    
    .cc-consent-categories {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .cc-consent-category+.cc-consent-category {
        border-top: 1px solid rgba(0, 0, 0, 0.075);
        padding-top: 1rem;
    }
    
    .cc-consent-category-head {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }
    
    .cc-consent-category-name {
        font-weight: 600;
    }
    
    /* The switch sits at the right edge and keeps its width when the name wraps. */
    .cc-consent-switch {
        flex: 0 0 auto;
        padding-left: 2.25rem;
        min-height: 1.5rem;
    }
    
    .cc-consent-category-description {
        margin-top: 0.25rem;
        font-size: 0.875rem;
        opacity: 0.8;
    }
    
    .cc-consent-category-description p:last-child {
        margin-bottom: 0;
    }
    
    .cc-consent-info {
        margin-top: 1.5rem;
    }
    
    .cc-consent-save {
        margin-top: 1.5rem;
        display: flex;
        justify-content: flex-end;
    }
}

@media ( min-width : 576px) {
    .cc-consent .cc-consent-actions {
        flex-direction: row;
        justify-content: flex-end;
        gap: 1rem;
    }
    .cc-consent .cc-consent-actions .btn {
        width: auto;
    }
}