/* NF Digital Shop Cookie Consent Frontend Styles */

/* Base Container */
.nfds-cookie-consent {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    animation: nfds-slideIn 0.3s ease-out;
}

/* Positioning Classes */
.nfds-consent-bottom,
.nfds-consent-bottom-full {
    bottom: 0;
    left: 0;
    right: 0;
}

.nfds-consent-top {
    top: 0;
    left: 0;
    right: 0;
}

.nfds-consent-bottom-left {
    bottom: 20px;
    left: 20px;
    max-width: 400px;
}

.nfds-consent-bottom-right {
    bottom: 20px;
    right: 20px;
    max-width: 400px;
}

.nfds-consent-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    width: 90%;
}

.nfds-consent-center,
.nfds-consent-center-modal {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 700px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* Modal Overlay - create separate overlay element */
.nfds-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999998;
}

.nfds-modal-overlay.active {
    display: block;
}

/* Modal specific styles */
.nfds-consent-center-modal {
    z-index: 999999;
}

/* Theme Classes */
.nfds-consent-theme-light .nfds-consent-wrapper {
    background: #ffffff;
    color: #333333;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.nfds-consent-theme-dark .nfds-consent-wrapper {
    background: #1a1a1a;
    color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.nfds-consent-theme-custom .nfds-consent-wrapper {
    background: var(--nfds-consent-bg, #ffffff);
    color: var(--nfds-consent-text, #333333);
}

/* Wrapper and Container */
.nfds-consent-wrapper {
    padding: 20px;
    border-radius: 8px;
}

.nfds-consent-bottom .nfds-consent-wrapper,
.nfds-consent-bottom-full .nfds-consent-wrapper,
.nfds-consent-top .nfds-consent-wrapper {
    border-radius: 0;
}

.nfds-consent-bottom-center .nfds-consent-wrapper,
.nfds-consent-center .nfds-consent-wrapper,
.nfds-consent-center-modal .nfds-consent-wrapper {
    border-radius: 12px;
}

.nfds-consent-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Main Banner */
.nfds-consent-main {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nfds-consent-logo {
    flex-shrink: 0;
}

.nfds-consent-logo img {
    max-height: 60px;
    max-width: 150px;
    height: auto;
}

.nfds-consent-content {
    flex: 1;
    min-width: 200px;
}

.nfds-consent-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
}

.nfds-consent-description {
    margin: 0 0 10px;
    opacity: 0.9;
}

.nfds-consent-links {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.nfds-consent-links a {
    color: var(--nfds-consent-primary);
    text-decoration: none;
    font-size: 13px;
    transition: opacity 0.2s;
}

.nfds-consent-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Action Buttons - Psychology Optimized */
.nfds-consent-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.nfds-consent-btn {
    border: none;
    border-radius: 25px; /* Rounded buttons feel friendlier */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

/* ACCEPT BUTTON - Maximum prominence */
.nfds-consent-btn-accept {
    background: linear-gradient(135deg, #5cb85c 0%, #4cae4c 100%);
    color: white;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 32px;
    box-shadow: 0 4px 15px rgba(92, 184, 92, 0.4);
    text-transform: none;
    letter-spacing: 0.3px;
    animation: pulseGreen 2s infinite;
    order: 1; /* Show first = primary action position */
}

@keyframes pulseGreen {
    0% {
        box-shadow: 0 4px 15px rgba(92, 184, 92, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(92, 184, 92, 0.6);
    }
    100% {
        box-shadow: 0 4px 15px rgba(92, 184, 92, 0.4);
    }
}

.nfds-consent-btn-accept::after {
    content: '✓';
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    transition: right 0.3s;
}

.nfds-consent-btn-accept:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 25px rgba(92, 184, 92, 0.5);
    background: linear-gradient(135deg, #6bc96b 0%, #5cbf5c 100%);
}

.nfds-consent-btn-accept:hover::after {
    right: 10px;
}

/* REJECT BUTTON - Less prominent */
.nfds-consent-btn-reject {
    background: transparent;
    color: #999;
    font-size: 13px;
    font-weight: 400;
    padding: 8px 16px;
    border: 1px solid rgba(0,0,0,0.1);
    text-decoration: none;
    order: 3;
}

.nfds-consent-theme-dark .nfds-consent-btn-reject {
    color: #666;
    border-color: rgba(255,255,255,0.1);
}

.nfds-consent-btn-reject:hover {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.2);
}

/* SETTINGS BUTTON - Neutral but small */
.nfds-consent-btn-settings {
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 20px;
    border: 1px solid rgba(0,0,0,0.08);
    order: 2; /* Keep in middle position */
}

.nfds-consent-theme-dark .nfds-consent-btn-settings {
    background: rgba(255,255,255,0.1);
    color: #aaa;
    border-color: rgba(255,255,255,0.1);
}

.nfds-consent-btn-settings:hover {
    background: #eeeeee;
    transform: translateY(-1px);
}

/* Visual separator between accept button and others */
.nfds-consent-btn-accept::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 15%;
    height: 70%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.1), transparent);
}

/* Settings Panel */
.nfds-consent-settings {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    animation: nfds-fadeIn 0.3s ease-out;
    position: relative;
}

.nfds-consent-theme-dark .nfds-consent-settings {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.nfds-consent-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
    padding-right: 40px;
}

.nfds-consent-settings-header h3 {
    margin: 0;
    font-size: 16px;
}

.nfds-consent-close {
    position: absolute;
    top: -5px;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
    padding: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nfds-consent-theme-dark .nfds-consent-close {
    background: #333;
    border-color: #555;
    color: #fff;
}

.nfds-consent-close:hover {
    transform: rotate(90deg);
    background: #f44336;
    color: white;
    border-color: #f44336;
}

/* Cookie Categories */
.nfds-consent-category {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
}

.nfds-consent-theme-dark .nfds-consent-category {
    background: rgba(255, 255, 255, 0.05);
}

.nfds-consent-category-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nfds-consent-category-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nfds-consent-category-info h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
}

.nfds-consent-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 5px;
    transition: transform 0.2s;
}

.nfds-consent-toggle[data-expanded="true"] .nfds-consent-icon {
    transform: rotate(180deg);
}

.nfds-consent-category-description {
    margin-top: 10px;
}

.nfds-consent-category-description p {
    margin: 0;
    font-size: 13px;
    opacity: 0.8;
}

.nfds-consent-cookie-list {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
    font-size: 12px;
}

.nfds-consent-theme-dark .nfds-consent-cookie-list {
    background: rgba(255, 255, 255, 0.03);
}

.nfds-cookie-table {
    width: 100%;
    font-size: 11px;
    border-collapse: collapse;
}

.nfds-cookie-table tr {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nfds-consent-theme-dark .nfds-cookie-table tr {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nfds-cookie-table tr:last-child {
    border-bottom: none;
}

.nfds-cookie-table td {
    padding: 5px;
    vertical-align: top;
}

.nfds-cookie-table td:first-child {
    width: 35%;
    font-weight: 600;
}

.nfds-cookie-table td:nth-child(2) {
    width: 45%;
}

.nfds-cookie-table td:last-child {
    width: 20%;
    text-align: right;
    color: #666;
    font-size: 10px;
}

.nfds-consent-theme-dark .nfds-cookie-table td:last-child {
    color: #999;
}

/* Toggle Switch */
.nfds-consent-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.nfds-consent-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.nfds-consent-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.nfds-consent-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .nfds-consent-slider {
    background-color: var(--nfds-consent-primary);
}

input:disabled + .nfds-consent-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

input:checked + .nfds-consent-slider:before {
    transform: translateX(24px);
}

/* Settings Footer */
.nfds-consent-settings-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: right;
}

.nfds-consent-theme-dark .nfds-consent-settings-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.nfds-consent-btn-save {
    background: var(--nfds-consent-primary);
    color: white;
    padding: 12px 30px;
}

.nfds-consent-btn-save:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Animations */
@keyframes nfds-slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes nfds-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nfds-consent-main {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nfds-consent-actions {
        flex-direction: column;
    }
    
    .nfds-consent-btn {
        width: 100%;
        justify-content: center;
    }
    
    .nfds-consent-bottom-left,
    .nfds-consent-bottom-right {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }
}

/* Hide class for initial state */
.nfds-consent-hidden {
    display: none !important;
}