/* LCDJ Alerts Styles */

/* Alerts Page */
.lcdj-alerts-page {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
}

.alerts-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 20px;
}

.alerts-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #2c3e50;
}

.alerts-count-text {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.create-alert-btn {
    margin-bottom: 20px;
}

/* Alerts List */
.lcdj-alerts-list {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

/* Alert Card */
.lcdj-alert-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    transition: box-shadow 0.3s;
}

.lcdj-alert-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
    flex: 1;
}

.alert-header h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

/* Alert Badge */
.alert-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.alert-badge-active {
    background: #d5f4e6;
    color: #27ae60;
}

.alert-badge-paused {
    background: #fef5e7;
    color: #f39c12;
}

.alert-badge-inactive {
    background: #fadbd8;
    color: #e74c3c;
}

/* Alert Body */
.alert-body {
    flex: 1;
    border-top: none;
    padding-top: 0;
}

.alert-body p {
    margin: 4px 0;
    font-size: 13px;
    color: #555;
}

.alert-type {
    font-weight: 500;
}

.alert-notify {
    color: #27ae60;
}

.alert-date {
    color: #999;
    margin-top: 6px;
    font-size: 12px;
}

/* Alert Filter Items */
.alert-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.alert-filter-item:last-of-type {
    border-bottom: none;
}

.alert-filter-icon {
    font-size: 18px;
    min-width: 24px;
    text-align: center;
}

.alert-filter-text {
    flex: 1;
    word-break: break-word;
}

/* Alert Actions */
.alert-actions {
    display: flex;
    gap: 8px;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 100px;
}

.lcdj-btn-danger {
    background: #959387;
    color: #fff;
}

.lcdj-btn-danger:hover {
    background: #605D53;
}

/* Empty State */
.lcdj-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.lcdj-empty-state p {
    font-size: 16px;
    color: #666;
    margin: 0 0 20px 0;
}

/* Alert Form */
.lcdj-alert-form-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    display: block;
    width: 100%;
}

.lcdj-alert-form-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
}

#alert-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lcdj-form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.lcdj-form-group label {
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lcdj-form-group input[type="text"],
.lcdj-form-group input[type="number"],
.lcdj-form-group select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.lcdj-form-group input:focus,
.lcdj-form-group select:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

/* Checkbox */
.lcdj-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.lcdj-checkbox input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
}

.lcdj-checkbox label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    font-size: 14px;
}

/* Localidades - Chips/Pills Style */
.lcdj-localidades-list {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.lcdj-checkboxes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.lcdj-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    position: relative;
}

.lcdj-checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    cursor: pointer;
}

.lcdj-checkbox-item span {
    cursor: pointer;
    user-select: none;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #f9f9f9;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 12px;
    text-transform: capitalize;
    font-weight: 300;
}

.lcdj-checkbox-item input[type="checkbox"]:checked + span {
    background: #000000;
    color: #fff;
    border-color: #000000;
}

.lcdj-checkbox-item:hover span {
    border-color: #2c3e50;
}

.loading-text {
    font-size: 14px;
    color: #999;
    text-align: center;
    padding: 10px 0;
}

/* Form Section Styling */
.lcdj-form-group {
    padding-bottom: 0;
}

.lcdj-form-group.section-group {
    border-bottom: none;
}

/* Operation Buttons (Radio style) */
.lcdj-form-group select[name="type"] {
    display: none;
}

.lcdj-operation-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.lcdj-operation-button {
    flex: 0 1 auto;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #f9f9f9;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    transition: all 0.3s ease;
    user-select: none;
    font-weight: 300;
}

.lcdj-operation-button:hover {
    border-color: #2c3e50;
}

.lcdj-operation-button.active {
    background: #000000;
    color: #fff;
    border-color: #000000;
}

/* Price Range Slider */
.lcdj-price-slider {
    margin: 15px 0;
    padding: 10px 0;
}

.lcdj-form-group:has(.lcdj-price-slider) {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.noUi-target {
    background: #fafafa;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.noUi-target.noUi-touch-active {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.noUi-base {
    padding: 5px 0;
}

.noUi-connects {
    background: #2c3e50;
}

.noUi-handle {
    background: #fff;
    border: 2px solid #2c3e50;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: grab;
    width: 24px;
    height: 24px;
    right: -12px;
    top: -6px;
}

.noUi-handle:active {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    cursor: grabbing;
}

.noUi-handle:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
}

.noUi-horizontal {
    height: 12px;
}

.noUi-horizontal .noUi-handle {
    width: 26px;
    height: 26px;
    right: -13px;
    top: -7px;
}

.lcdj-price-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
    width: 100%;
}

.price-input-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    width: 100%;
}

.price-input-group label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

.price-input-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    font-size: 14px;
}

.price-separator {
    color: #999;
    font-size: 16px;
    line-height: 1;
    padding: 0 8px;
}

/* Modal Overlay */
.lcdj-alert-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Box */
.lcdj-alert-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUpModal 0.3s ease;
}

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

/* Modal Header */
.lcdj-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #ecf0f1;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}

.lcdj-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #2c3e50;
    font-weight: 600;
}

/* Modal Close Button */
.lcdj-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.lcdj-modal-close:hover {
    color: #2c3e50;
}

/* Modal Content */
.lcdj-modal-content {
    padding: 30px;
    width: 100%;
    box-sizing: border-box;
}

.lcdj-alert-form-container {
    display: block !important;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .lcdj-alert-modal {
        width: 95%;
        max-height: 95vh;
    }

    .lcdj-modal-header {
        padding: 20px;
    }

    .lcdj-modal-header h2 {
        font-size: 20px;
    }

    .lcdj-modal-content {
        padding: 20px;
    }
}

/* Buttons in Form */
#alert-form .lcdj-btn {
    padding: 12px 24px;
    background: #959387;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    width: 100%;
}

#alert-form .lcdj-btn:hover {
    background: #605D53;
}

/* Alert Stats */
.alerts-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .lcdj-alerts-page {
        margin: 20px 15px;
        padding: 15px;
    }

    .lcdj-alert-card {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .alert-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .alert-actions {
        grid-column: 1;
        flex-direction: row;
        width: 100%;
    }

    .alert-actions .lcdj-btn {
        flex: 1;
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Mobile: Alert Card Layout */
    .lcdj-alert-card {
        flex-direction: column;
        gap: 15px;
        padding: 16px;
    }

    .alert-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 10px;
    }

    .alert-header h3 {
        font-size: 16px;
        margin: 0;
    }

    .alert-badge {
        font-size: 10px;
        padding: 3px 10px;
        margin-bottom: 0;
    }

    .alert-body {
        width: 100%;
        padding: 10px 0;
    }

    .alert-body p {
        font-size: 12px;
        margin: 6px 0;
    }

    .alert-filter-item {
        font-size: 13px;
        padding: 6px 0;
        gap: 8px;
    }

    .alert-filter-icon {
        font-size: 16px;
        min-width: 20px;
    }

    .alert-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
        min-width: auto;
    }

    .alert-actions .lcdj-btn {
        width: 100%;
        padding: 10px 12px;
        font-size: 13px;
    }

    .lcdj-alert-form-container {
        padding: 20px;
    }

    .alerts-header h2 {
        font-size: 24px;
    }

    .alerts-stats {
        grid-template-columns: 1fr;
    }
}

/* Loading State */
.lcdj-alerts-list.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lcdj-alert-card {
    animation: slideDown 0.3s ease;
}
