﻿/* Cookie consent banner + Cookie Preferences page */

@keyframes loft-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

#loft-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #111;
    border-top: 4px solid #00b2ee;
    color: #fff;
    z-index: 9000;
    padding: 16px 24px;
    display: none;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.25);
}

#loft-cookie-banner.loft-open {
    display: flex;
    animation: loft-slide-up 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.loft-msg {
    flex: 1;
    margin: 0;
    font-size: 14px;
    min-width: 200px;
    color: #fff;
}

.loft-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.loft-btn {
    display: inline-block;
    background: #fff;
    color: #111 !important;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    border-radius: 3px;
    text-decoration: none !important;
    white-space: nowrap;
    line-height: 1.4;
}

.loft-btn:hover,
.loft-btn:focus {
    background: #e8e8e8;
    color: #111 !important;
    text-decoration: none !important;
    outline: 2px solid #00b2ee;
    outline-offset: 2px;
}

.loft-btn-primary {
    background: #00b2ee;
}

.loft-btn-primary:hover,
.loft-btn-primary:focus {
    background: #33c3f2;
}

#loft-cookie-revoke {
    position: fixed;
    bottom: 0;
    left: 3em;
    background: #111;
    color: #fff;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    z-index: 9000;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border-top: 2px solid #00b2ee;
    display: none;
}

#loft-cookie-revoke:hover,
#loft-cookie-revoke:focus {
    background: #333;
}

/* ---- Cookie Preferences page ---- */

.cookie-prefs-section > p {
    color: #555;
    margin-bottom: 24px;
}

.cookie-pref-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 16px;
    overflow: hidden;
}

.cookie-pref-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f9f9f9;
    gap: 16px;
}

.cookie-pref-info {
    flex: 1;
}

.cookie-pref-info h4 {
    margin: 0 0 4px;
    font-size: 15px;
}

.cookie-pref-info p {
    margin: 0 0 6px;
    font-size: 13px;
    color: #666;
}

.cookie-details-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    color: #007aa3;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cookie-details-btn .btn-text {
    text-decoration: underline;
}

.cookie-details-btn:focus {
    outline: 2px solid #007aa3;
    outline-offset: 2px;
}

.cookie-details-btn .btn-arrow {
    display: inline-block;
    transition: transform .2s;
    text-decoration: none;
}

.cookie-details-btn.open .btn-arrow {
    transform: rotate(180deg);
}

.cookie-pref-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.always-on,
.gpc-badge {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    margin: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 26px;
    transition: background-color .3s;
}

.cookie-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform .3s;
}

.cookie-toggle input:checked + .cookie-slider {
    background-color: #007aa3;
}

.cookie-toggle input:checked + .cookie-slider:before {
    transform: translateX(22px);
}

.cookie-toggle input:focus + .cookie-slider {
    outline: 2px solid #007aa3;
    outline-offset: 2px;
}

/* Details table */
.cookie-pref-details {
    display: none;
    padding: 0 20px 16px;
    border-top: 1px solid #eee;
}

.cookie-pref-details.open {
    display: block;
}

.cookie-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
    margin-top: 12px;
}

.cookie-table th {
    text-align: left;
    padding: 6px 8px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.cookie-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.cookie-table tr:last-child td {
    border-bottom: none;
}

.cookie-prefs-actions {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.cookie-save-msg {
    font-size: 13px;
    color: #2a7a2a;
    display: none;
}
