/* Newsletter section positioning */
.newsletter {
    position: relative;
}

/* Newsletter Settings Button */
.newsletter-settings-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.newsletter-settings-btn:hover {
    border-color: #814ac8;
    background: rgba(129, 74, 200, 0.1);
}

.newsletter-settings-btn svg {
    width: 20px;
    height: 20px;
}

/* Newsletter Settings Dialog */
.newsletter-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.newsletter-dialog.active {
    display: flex;
    opacity: 1;
}

.newsletter-dialog-content {
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    width: 90vw;
    height: 90vh;
    position: relative;
    animation: slideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Dialog Header */
.newsletter-dialog-header {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    position: relative;
}

.newsletter-close {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.newsletter-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%) rotate(90deg);
}

.newsletter-title-dialog {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    text-align: left;
    color: #fff;
    letter-spacing: 0.5px;
}

/* Tabs */
.newsletter-tabs {
    flex-shrink: 0;
    padding: 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
}

.newsletter-tabs .tab-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    font-family: Figtree, "Figtree Placeholder", sans-serif;
}

.newsletter-tabs .tab-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.newsletter-tabs .tab-btn.active {
    color: #814ac8;
    border-bottom-color: #814ac8;
}

/* Dialog Body */
.newsletter-dialog-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    scrollbar-width: thin;
    scrollbar-color: rgba(129, 74, 200, 0.5) rgba(255, 255, 255, 0.1);
}

.newsletter-dialog-body::-webkit-scrollbar {
    width: 6px;
}

.newsletter-dialog-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.newsletter-dialog-body::-webkit-scrollbar-thumb {
    background: rgba(129, 74, 200, 0.5);
    border-radius: 0;
}

.newsletter-dialog-body::-webkit-scrollbar-thumb:hover {
    background: rgba(129, 74, 200, 0.8);
}

/* Dialog Footer */
.newsletter-dialog-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    background: #000;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
}

/* Form */
.newsletter-config-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-config-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 25px;
}

.newsletter-config-form .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    align-items: start;
}

.newsletter-config-form .form-row.cols-1 {
    grid-template-columns: 1fr;
}

.newsletter-config-form .form-group.full-width {
    grid-column: 1 / -1;
}

.newsletter-config-form .form-row .form-group {
    margin-bottom: 0;
}

.newsletter-config-form .form-group label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 400;
}

.newsletter-config-form .form-group small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.newsletter-config-form .form-group input[type="text"],
.newsletter-config-form .form-group input[type="number"],
.newsletter-config-form .form-group select,
.newsletter-config-form .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    color: #fff;
    font-size: 14px;
    font-family: Figtree, "Figtree Placeholder", sans-serif;
    transition: all 0.3s ease;
}

.newsletter-config-form .form-group input:focus,
.newsletter-config-form .form-group select:focus,
.newsletter-config-form .form-group textarea:focus {
    outline: none;
    border-color: #814ac8;
    background: rgba(255, 255, 255, 0.05);
}

/* Color Picker */
.color-picker-wrapper {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.color-picker-input {
    width: 50px;
    max-width: 50px;
    min-width: 50px;
    height: 45px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    cursor: pointer;
}

.color-text-input {
    flex: 1;
    font-family: monospace;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Errors and Success */
.newsletter-error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 0;
    padding: 10px 12px;
    color: #ff6b6b;
    font-size: 13px;
    text-align: center;
}

.newsletter-success {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 0;
    padding: 10px 12px;
    color: #6bff6b;
    font-size: 13px;
    text-align: center;
}

/* Buttons */
.btn-newsletter-dialog {
    padding: 8px 16px;
    background: #814ac8;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    font-family: Figtree, "Figtree Placeholder", sans-serif;
    white-space: nowrap;
}

.btn-newsletter-dialog:hover {
    background: #9b66d6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(129, 74, 200, 0.3);
}

.btn-newsletter-dialog:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-newsletter-dialog-secondary {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    font-family: Figtree, "Figtree Placeholder", sans-serif;
    white-space: nowrap;
}

.btn-newsletter-dialog-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Radio Groups */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #814ac8;
    cursor: pointer;
}

/* Gradient Settings Layout */
.gradient-settings-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 20px;
}

.gradient-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gradient-stop {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 0;
}

.gradient-stop label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 10px;
}

.gradient-stop .form-row {
    display: grid;
    grid-template-columns: 1fr 120px 100px;
    gap: 15px;
    margin-bottom: 0;
}

.gradient-stop input[type="range"] {
    width: 60px;
}

.gradient-stop span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-left: 5px;
}

.gradient-preview-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gradient-preview-container label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.intro-gradient-preview {
    width: 100%;
    height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
}

/* Gradient Direction Grid */
.gradient-direction-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.gradient-direction-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    transition: all 0.3s ease;
}

.gradient-direction-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #814ac8;
}

.gradient-direction-option input[type="radio"] {
    display: none;
}

.gradient-direction-option input[type="radio"]:checked + .gradient-direction-preview {
    border-color: #814ac8;
}

.gradient-direction-preview {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    transition: all 0.3s ease;
}

.gradient-direction-option span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

/* Subscribers Toolbar */
.subscribers-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.subscribers-search {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.subscribers-search input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    color: #fff;
    font-size: 14px;
    font-family: Figtree, "Figtree Placeholder", sans-serif;
    transition: all 0.3s ease;
}

.subscribers-search input:focus {
    outline: none;
    border-color: #814ac8;
    background: rgba(255, 255, 255, 0.05);
}

.subscribers-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.subscribers-actions {
    display: flex;
    gap: 10px;
}

.btn-delete-all {
    padding: 8px 16px;
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    font-family: Figtree, "Figtree Placeholder", sans-serif;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-delete-all:hover {
    background: rgba(220, 53, 69, 0.4);
    border-color: rgba(220, 53, 69, 0.5);
}

/* Stats Cards */
.subscribers-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #814ac8;
    font-size: 32px;
    font-weight: 500;
    line-height: 1;
}

/* Subscribers Table */
.subscribers-table-container {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 20px;
}

.subscribers-table {
    width: 100%;
    border-collapse: collapse;
}

.subscribers-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.subscribers-table th {
    padding: 12px 15px;
    text-align: left;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.subscribers-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.subscribers-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.subscribers-table tbody tr.selected {
    background: rgba(129, 74, 200, 0.1);
}

.subscribers-table td {
    padding: 15px;
    color: #fff;
    font-size: 14px;
}

.subscriber-email {
    color: #fff;
    font-size: 14px;
}

.subscriber-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.checkbox-select {
    width: 18px;
    height: 18px;
    accent-color: #814ac8;
    cursor: pointer;
}

.btn-delete-subscriber {
    padding: 6px 12px;
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
    border-radius: 0;
    cursor: pointer;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    font-family: Figtree, "Figtree Placeholder", sans-serif;
}

.btn-delete-subscriber:hover {
    background: rgba(220, 53, 69, 0.4);
    border-color: rgba(220, 53, 69, 0.5);
}

.newsletter-list-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

/* Pagination */
.subscribers-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.pagination-info span {
    color: #fff;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pagination-controls span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.btn-pagination {
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-pagination:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: #814ac8;
}

.btn-pagination:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 1200px) {
    .gradient-settings-layout {
        grid-template-columns: 1fr 250px;
    }
}

@media (max-width: 900px) {
    .gradient-settings-layout {
        grid-template-columns: 1fr;
    }

    .gradient-preview-container {
        order: -1;
    }

    .intro-gradient-preview {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .newsletter-dialog-content {
        width: 95vw;
        height: 95vh;
    }

    .newsletter-dialog-header {
        padding: 15px 20px;
    }

    .newsletter-close {
        right: 15px;
    }

    .newsletter-title-dialog {
        font-size: 15px;
    }

    .newsletter-tabs {
        padding: 0 20px;
        overflow-x: auto;
    }

    .newsletter-dialog-body {
        padding: 20px;
    }

    .newsletter-dialog-footer {
        padding: 15px 20px;
    }

    .newsletter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-newsletter-dialog,
    .btn-newsletter-dialog-secondary {
        width: 100%;
    }

    .newsletter-config-form .form-row {
        grid-template-columns: 1fr;
    }

    .gradient-direction-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .subscribers-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .subscribers-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .subscribers-search {
        min-width: 100%;
    }

    .color-picker-input {
        height: 40px;
    }
}

@media (max-width: 600px) {
    .newsletter-tabs {
        gap: 5px;
    }

    .newsletter-tabs .tab-btn {
        padding: 10px 12px;
        font-size: 12px;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
