#orgacookie-container {
    position: relative;
    z-index: 99998;
}

.orgacookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.orgacookie-overlay.active {
    display: block;
    opacity: 1;
}

/* Base styles for all popup/banner modes */
#orgacookie-banner {
    position: fixed;
    background-color: #fff;
    color: #333;
    padding: 20px 25px;
    z-index: 100000;
    box-sizing: border-box;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
    font-size: 14px;
    line-height: 1.5;
}

#orgacookie-banner.active {
    opacity: 1;
}

/* Mode: Bottom Banner (Full Width) */
#orgacookie-banner.orgacookie-mode-banner-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    border-top: 1px solid #eee;
    transform: translateY(100%);
}
#orgacookie-banner.orgacookie-mode-banner-bottom.active {
    transform: translateY(0);
}

/* Mode: Centered Popup */
#orgacookie-banner.orgacookie-mode-popup-center {
    top: 50%;
    left: 50%;
    width: 90%;
    max-width: 720px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    transform: translate(-50%, -50%) scale(0.95);
}
#orgacookie-banner.orgacookie-mode-popup-center.active {
    transform: translate(-50%, -50%) scale(1);
}
#orgacookie-banner.orgacookie-mode-popup-center .orgacookie-banner-content {
    flex-direction: column;
}
#orgacookie-banner.orgacookie-mode-popup-center .orgacookie-description {
    margin-right: 0;
    margin-bottom: 15px;
}
#orgacookie-banner.orgacookie-mode-popup-center .orgacookie-actions {
    text-align: center;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
}

/* Mode: Bottom Corner Banners */
#orgacookie-banner.orgacookie-mode-banner-bottom-left,
#orgacookie-banner.orgacookie-mode-banner-bottom-right {
    bottom: 20px;
    width: auto;
    max-width: 380px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
    transform: translateY(calc(100% + 20px));
}
#orgacookie-banner.orgacookie-mode-banner-bottom-left.active,
#orgacookie-banner.orgacookie-mode-banner-bottom-right.active {
    transform: translateY(0);
}

#orgacookie-banner.orgacookie-mode-banner-bottom-left {
    left: 20px;
}

#orgacookie-banner.orgacookie-mode-banner-bottom-right {
    right: 20px;
    left: auto;
}

/* For corner banners, force vertical layout of content */
#orgacookie-banner.orgacookie-mode-banner-bottom-left .orgacookie-banner-content,
#orgacookie-banner.orgacookie-mode-banner-bottom-right .orgacookie-banner-content {
    flex-direction: column;
}
#orgacookie-banner.orgacookie-mode-banner-bottom-left .orgacookie-description,
#orgacookie-banner.orgacookie-mode-banner-bottom-right .orgacookie-description {
     margin-right: 0;
     margin-bottom: 15px;
}
#orgacookie-banner.orgacookie-mode-banner-bottom-left .orgacookie-actions,
#orgacookie-banner.orgacookie-mode-banner-bottom-right .orgacookie-actions {
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

#orgacookie-banner .orgacookie-banner-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    /* Responsive layout only for full-width bottom banner */
     #orgacookie-banner.orgacookie-mode-banner-bottom .orgacookie-banner-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
     #orgacookie-banner.orgacookie-mode-banner-bottom .orgacookie-description {
        flex-grow: 1;
        margin-right: 20px;
        margin-bottom: 0;
     }
     #orgacookie-banner.orgacookie-mode-banner-bottom .orgacookie-actions {
         flex-shrink: 0;
         text-align: right;
     }
}

.orgacookie-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    font-weight: bold;
    color: #222;
}

#orgacookie-banner .orgacookie-description {
    margin: 0 0 15px 0;
}
#orgacookie-banner .orgacookie-description p {
    margin: 0 0 5px 0;
}
#orgacookie-banner .orgacookie-links {
    margin-top: 5px;
}
#orgacookie-banner .orgacookie-links a {
    color: #0073aa;
    text-decoration: underline;
    display: inline-block;
    margin-right: 15px;
}
#orgacookie-banner .orgacookie-links a:last-child {
    margin-right: 0;
}
#orgacookie-banner .orgacookie-links a:hover {
    color: #005177;
}


.orgacookie-actions button.orgacookie-btn,
button.orgacookie-btn {
    cursor: pointer;
    padding: 8px 15px;
    border: 1px solid #ccc;
    background-color: #f7f7f7;
    color: #555;
    margin: 5px;
    border-radius: 3px;
    font-size: 0.95em;
    transition: background-color 0.2s ease;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}
.orgacookie-actions button.orgacookie-btn:hover,
button.orgacookie-btn:hover {
    background-color: #eee;
    border-color: #bbb;
}

button.orgacookie-btn.accept-all,
button.orgacookie-btn.accept-all-details,
button.orgacookie-btn.save-settings {
    background-color: #0085ba;
    border-color: #0073aa #006799 #006799;
    color: #fff;
    box-shadow: 0 1px 0 #006799;
    text-decoration: none;
}
button.orgacookie-btn.accept-all:hover,
button.orgacookie-btn.accept-all-details:hover,
button.orgacookie-btn.save-settings:hover {
    background-color: #0073aa;
    border-color: #006799;
    color: #fff;
}

button.orgacookie-btn.show-details-link,
button.orgacookie-btn.hide-details-link {
    background: none;
    border: none;
    color: #0073aa;
    text-decoration: underline;
    box-shadow: none;
    padding: 8px 5px;
}
button.orgacookie-btn.show-details-link:hover,
button.orgacookie-btn.hide-details-link:hover {
    color: #005177;
    background: none;
}

.orgacookie-details {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    width: 100%;
}

.orgacookie-actions.detailed-actions {
    margin-top: 15px;
}

.orgacookie-category {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
}

/* 2-column layout for details in centered popup */
@media (min-width: 520px) {
    #orgacookie-banner.orgacookie-mode-popup-center .orgacookie-categories-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    #orgacookie-banner.orgacookie-mode-popup-center .orgacookie-categories-list .orgacookie-category {
        margin-bottom: 0;
    }
}

.orgacookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
    margin-bottom: 5px;
}
.orgacookie-category-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    flex-grow: 1;
    margin-right: 10px;
}
.orgacookie-category-label input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}
.orgacookie-category-label strong {
     font-weight: bold;
}

.orgacookie-necessary-label {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
    margin-left: 5px;
}
.orgacookie-category-description {
    font-size: 0.9em;
    color: #555;
    margin-top: 5px;
    margin-left: 24px; /* Align with text */
}

button.orgacookie-toggle-details {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    font-size: 0.9em;
    padding: 5px;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: auto; /* Push to the right */
    flex-shrink: 0;
}
button.orgacookie-toggle-details:hover {
    color: #005177;
}
button.orgacookie-toggle-details svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.2s ease-in-out;
}
button.orgacookie-toggle-details[aria-expanded="true"] svg {
    transform: rotate(-180deg);
}

.orgacookie-category-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
    display: none;
    font-size: 0.9em;
     margin-left: 24px; /* Align with checkbox text */
}
.orgacookie-category-details.active {
    display: block;
}


.orgacookie-cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
    font-size: 0.95em;
}
.orgacookie-cookie-table th,
.orgacookie-cookie-table td {
    text-align: left;
    padding: 6px 8px;
    border: 1px solid #e0e0e0;
    vertical-align: top;
}
.orgacookie-cookie-table th {
    background-color: #f1f1f1;
    font-weight: bold;
}
.orgacookie-cookie-table td {
    background-color: #fff;
    word-break: break-word;
}
.orgacookie-cookie-table td:first-child { font-weight: 500; }

.orgacookie-reopen-btn {
    position: fixed;
    bottom: 15px;
    z-index: 99997;
    background-color: #0085ba;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
    transform: scale(0);
    opacity: 0;
}
.orgacookie-reopen-btn.active {
    transform: scale(1);
    opacity: 1;
}
.orgacookie-reopen-btn:hover {
    background-color: #0073aa;
    transform: scale(1.05);
}
.orgacookie-reopen-btn svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}
.orgacookie-reopen-left {
    left: 15px;
}
.orgacookie-reopen-right {
    right: 15px;
}

/* Themify framework compliance hints - Adapt classes as needed */
/* Example: If Themify uses 'ui button' */
/*
#orgacookie-banner button.orgacookie-btn {
    ... existing styles ...
    @extend .ui.button;
}
#orgacookie-banner button.orgacookie-btn.accept-all {
    ... existing styles ...
    @extend .ui.primary.button;
}
*/
/* Example: Apply announcement bar styling if applicable */
/*
#orgacookie-banner {
    @extend .announcement-bar;
    @extend .bottom;
    @extend .left; // or .right based on setting
}
*/
