/**
 * VOC Cookie Manager CSS
 * Modern, sharp corners, #f7374f primary color
 */

/* ============================================
   ADMIN PANEL STYLES
   ============================================ */

/* VOC Wrap */
.voc-wrap {
    margin: 20px 20px 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header */
.voc-header {
    margin-bottom: 30px;
}

.voc-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.voc-header-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.voc-header-title i {
    font-size: 40px;
    color: #f7374f;
}

.voc-header-title h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #0f172a;
}

.voc-header-title p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* Stats Grid */
.voc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.voc-stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.voc-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.voc-stat-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.voc-stat-icon.voc-primary {
    background: #f7374f;
}

.voc-stat-icon.voc-success {
    background: #10b981;
}

.voc-stat-icon.voc-danger {
    background: #ef4444;
}

.voc-stat-icon.voc-warning {
    background: #f59e0b;
}

.voc-stat-content {
    flex: 1;
}

.voc-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}

.voc-stat-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Tabs */
.voc-tabs {
    background: white;
    border: 1px solid #e2e8f0;
}

.voc-tab-nav {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    background: #f8fafc;
}

.voc-tab-button {
    padding: 16px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.voc-tab-button:hover {
    background: white;
    color: #0f172a;
}

.voc-tab-button.active {
    background: white;
    color: #f7374f;
    border-bottom-color: #f7374f;
}

.voc-tab-content {
    display: none;
    padding: 32px;
}

.voc-tab-content.active {
    display: block;
}

/* Cards */
.voc-card {
    background: white;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.voc-card-header {
    padding: 24px 28px;
    border-bottom: 2px solid #e2e8f0;
}

.voc-card-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.voc-card-body {
    padding: 28px;
}

.voc-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

/* Form Elements */
.voc-form-group {
    margin-bottom: 20px;
}

.voc-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.voc-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    font-size: 14px;
    transition: all 0.2s;
    font-family: inherit;
}

.voc-input:focus {
    outline: none;
    border-color: #f7374f;
    box-shadow: 0 0 0 3px rgba(247, 55, 79, 0.1);
}

/* Toggle */
.voc-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-left: 3px solid #e2e8f0;
    transition: all 0.2s;
}

.voc-toggle:hover {
    background: white;
    border-left-color: #f7374f;
}

.voc-toggle input[type="checkbox"] {
    margin-top: 2px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.voc-toggle-label {
    font-weight: 600;
    color: #0f172a;
    display: block;
    margin-bottom: 4px;
}

.voc-toggle-desc {
    font-size: 13px;
    color: #64748b;
    display: block;
}

/* Buttons */
.voc-button {
    padding: 14px 28px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.voc-button-primary {
    background: #f7374f;
    color: white;
    box-shadow: 0 2px 8px rgba(247, 55, 79, 0.25);
}

.voc-button-primary:hover {
    background: #e02040;
    box-shadow: 0 4px 12px rgba(247, 55, 79, 0.4);
    transform: translateY(-2px);
}

.voc-form-actions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
}

/* Notice */
.voc-notice {
    padding: 16px 20px;
    margin-bottom: 24px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 12px;
}

.voc-notice-success {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.voc-notice i {
    font-size: 20px;
}

/* Table */
.voc-table-responsive {
    overflow-x: auto;
}

.voc-table {
    width: 100%;
    border-collapse: collapse;
}

.voc-table thead {
    background: #f8fafc;
}

.voc-table th {
    padding: 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.voc-table td {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    color: #64748b;
}

.voc-table tbody tr:hover {
    background: #f8fafc;
}

.voc-text-center {
    text-align: center;
}

.voc-text-success {
    color: #10b981;
}

.voc-text-danger {
    color: #ef4444;
}

/* ============================================
   FRONTEND COOKIE BANNER & MODAL STYLES
   ============================================ */

/* Cookie Banner (Bottom) */
.voc-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    color: var(--voc-cookie-secondary, #1e293b);
    padding: 28px 32px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 999999;
    border-top: 3px solid var(--voc-cookie-primary, #f7374f);
}

.voc-cookie-banner.active {
    transform: translateY(0);
}

.voc-cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.voc-cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.voc-cookie-banner-text h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
}

.voc-cookie-icon {
    font-size: 22px;
    color: var(--voc-cookie-primary, #f7374f);
}

.voc-cookie-banner-text p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.voc-cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.voc-cookie-btn {
    padding: 14px 28px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 0;
    font-family: inherit;
}

.voc-cookie-btn-accept {
    background: var(--voc-cookie-primary, #f7374f);
    color: white;
    box-shadow: 0 2px 8px rgba(247, 55, 79, 0.25);
}

.voc-cookie-btn-accept:hover {
    background: #e02040;
    box-shadow: 0 4px 12px rgba(247, 55, 79, 0.4);
    transform: translateY(-2px);
}

.voc-cookie-btn-settings {
    background: white;
    color: var(--voc-cookie-primary, #f7374f);
    border: 2px solid #e2e8f0;
}

.voc-cookie-btn-settings:hover {
    background: #fef2f2;
    border-color: var(--voc-cookie-primary, #f7374f);
}

.voc-cookie-btn-reject {
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.voc-cookie-btn-reject:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Cookie Modal */
.voc-cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.voc-cookie-modal.active {
    opacity: 1;
    visibility: visible;
}

.voc-cookie-modal-content {
    background: white;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    border-radius: 0;
}

.voc-cookie-modal.active .voc-cookie-modal-content {
    transform: scale(1);
}

.voc-cookie-modal-header {
    background: var(--voc-cookie-primary, #f7374f);
    color: white;
    padding: 32px 28px;
    position: relative;
}

.voc-cookie-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    margin: 0 0 8px 0;
}

.voc-cookie-modal-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0;
}

.voc-cookie-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 0;
}

.voc-cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.voc-cookie-modal-body {
    padding: 32px 28px;
    overflow-y: auto;
    flex: 1;
}

/* Cookie Categories */
.voc-cookie-category {
    background: #f8fafc;
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    border-left: 3px solid #e2e8f0;
}

.voc-cookie-category:hover {
    background: #f1f5f9;
    border-left-color: var(--voc-cookie-primary, #f7374f);
}

.voc-cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.voc-cookie-category-title {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.voc-cookie-category-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: white;
    border: 2px solid #e2e8f0;
    color: var(--voc-cookie-primary, #f7374f);
}

.voc-cookie-category-info h3 {
    font-size: 16px;
    color: #0f172a;
    margin-bottom: 4px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.voc-cookie-category-info span {
    font-size: 13px;
    color: #64748b;
}

.voc-cookie-category-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.voc-cookie-badge {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid;
}

.voc-badge-required {
    background: white;
    color: var(--voc-cookie-primary, #f7374f);
    border-color: var(--voc-cookie-primary, #f7374f);
}

.voc-badge-optional {
    background: white;
    color: #64748b;
    border-color: #e2e8f0;
}

/* Toggle Switch */
.voc-toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.voc-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.voc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
}

.voc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .voc-toggle-slider {
    background: var(--voc-cookie-primary, #f7374f);
}

input:checked + .voc-toggle-slider:before {
    transform: translateX(24px);
}

input:disabled + .voc-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.voc-toggle-expand {
    background: none;
    border: none;
    color: var(--voc-cookie-primary, #f7374f);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.3s ease;
}

.voc-toggle-expand.expanded {
    transform: rotate(180deg);
}

/* Cookie Details */
.voc-cookie-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.voc-cookie-details.expanded {
    max-height: 1000px;
    margin-top: 24px;
}

.voc-cookie-details-content {
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
}

.voc-cookie-details p {
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 14px;
}

.voc-cookie-list {
    list-style: none;
    margin: 12px 0 0 0;
    padding: 0;
}

.voc-cookie-list li {
    padding: 16px;
    background: white;
    margin-bottom: 8px;
    border-left: 3px solid #e2e8f0;
    font-size: 13px;
    color: #64748b;
}

.voc-cookie-list li strong {
    color: #0f172a;
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

/* Modal Footer */
.voc-cookie-modal-footer {
    padding: 24px 28px;
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.voc-footer-left,
.voc-footer-right {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.voc-modal-btn {
    padding: 14px 28px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 0;
    font-family: inherit;
}

.voc-modal-btn-primary {
    background: var(--voc-cookie-primary, #f7374f);
    color: white;
    box-shadow: 0 2px 8px rgba(247, 55, 79, 0.25);
}

.voc-modal-btn-primary:hover {
    background: #e02040;
    box-shadow: 0 4px 12px rgba(247, 55, 79, 0.4);
    transform: translateY(-2px);
}

.voc-modal-btn-secondary {
    background: white;
    color: var(--voc-cookie-primary, #f7374f);
    border: 2px solid #e2e8f0;
}

.voc-modal-btn-secondary:hover {
    background: #fef2f2;
    border-color: var(--voc-cookie-primary, #f7374f);
}

.voc-modal-btn-text {
    background: transparent;
    color: #64748b;
    border: none;
    text-decoration: underline;
    padding: 14px 16px;
}

.voc-modal-btn-text:hover {
    color: #0f172a;
}

/* Cookie Widget (Sidebar) */
.voc-cookie-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.voc-cookie-widget.active {
    opacity: 1;
    visibility: visible;
}

.voc-cookie-widget-btn {
    background: white;
    color: var(--voc-cookie-primary, #f7374f);
    border: 2px solid #e2e8f0;
    width: 48px;
    height: 48px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.voc-cookie-widget-btn:hover {
    background: var(--voc-cookie-primary, #f7374f);
    border-color: var(--voc-cookie-primary, #f7374f);
    box-shadow: 0 8px 24px rgba(247, 55, 79, 0.2);
    transform: translateY(-2px);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .voc-cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
    }

    .voc-cookie-banner-actions {
        width: 100%;
        flex-direction: column;
    }

    .voc-cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .voc-cookie-modal-content {
        max-height: 100vh;
    }

    .voc-cookie-modal-header h2 {
        font-size: 20px;
    }

    .voc-cookie-modal-footer {
        flex-direction: column;
    }

    .voc-footer-left,
    .voc-footer-right {
        width: 100%;
    }

    .voc-modal-btn {
        width: 100%;
        justify-content: center;
    }

    .voc-cookie-category-controls {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .voc-cookie-banner {
        padding: 20px 16px;
    }

    .voc-cookie-modal-body {
        padding: 24px 16px;
    }

    .voc-cookie-widget {
        right: 16px;
        bottom: 16px;
    }

    .voc-cookie-widget-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .voc-cookie-category {
        padding: 16px;
    }

    .voc-cookie-category-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* Print */
@media print {
    .voc-cookie-banner,
    .voc-cookie-modal,
    .voc-cookie-widget {
        display: none !important;
    }
}
