/* Advanced Alerts Styles for PricePilot */

.advanced-alerts-section {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.section-header h4 {
    margin: 0 0 15px 0;
    color: #34495e;
    font-size: 16px;
    font-weight: 500;
}

.pro-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alert Types Grid */
.alert-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 25px;
}

.alert-type-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e8ecef;
    transition: all 0.3s ease;
}

.alert-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.alert-type-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.alert-type-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-icon {
    font-size: 18px;
}

.alert-type-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Toggle Switches */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Form Elements */
.settings-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

.settings-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.settings-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    cursor: pointer;
}

.help-text {
    color: #6c757d;
    font-size: 11px;
    margin-top: 4px;
}

/* Alert Conditions */
.alert-conditions-section {
    margin-bottom: 25px;
}

.conditions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.condition-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e8ecef;
}

.condition-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
}

.condition-input {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
}

.condition-input input {
    width: 60px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

/* Alert Settings */
.alert-settings-section {
    margin-bottom: 25px;
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e8ecef;
}

.setting-group label {
    font-size: 13px;
    font-weight: 500;
    color: #2c3e50;
    min-width: 80px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.quiet-hours-config {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e8ecef;
}

.time-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.time-inputs input {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

/* Alert History */
.alert-history-section {
    margin-bottom: 25px;
}

.alerts-list {
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    border: 1px solid #e8ecef;
}

.alert-item {
    padding: 12px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.alert-item:hover {
    background-color: #f8f9fa;
}

.alert-item:last-child {
    border-bottom: none;
}

.alert-item.high {
    border-left: 4px solid #e74c3c;
}

.alert-item.urgent {
    border-left: 4px solid #c0392b;
    background-color: #fdf2f2;
}

.alert-item.medium {
    border-left: 4px solid #f39c12;
}

.alert-item.low {
    border-left: 4px solid #3498db;
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.alert-title {
    font-weight: 600;
    font-size: 13px;
    color: #2c3e50;
}

.alert-time {
    font-size: 11px;
    color: #6c757d;
}

.alert-message {
    font-size: 12px;
    color: #495057;
    margin-bottom: 4px;
}

.alert-product {
    font-size: 11px;
    color: #6c757d;
    font-style: italic;
}

.alert-details {
    display: flex;
    gap: 12px;
    margin: 8px 0;
}

.alert-type, .alert-priority {
    font-size: 10px;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    color: #495057;
}

.alert-link {
    font-size: 11px;
    color: #667eea;
    text-decoration: none;
}

.alert-link:hover {
    text-decoration: underline;
}

.no-alerts {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Buttons */
.primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.secondary-btn {
    background: white;
    color: #667eea;
    border: 1px solid #667eea;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: #667eea;
    color: white;
}

.text-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}

.text-btn:hover {
    color: #764ba2;
}

.upgrade-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

/* Actions Section */
.actions-section {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Premium Overlay */
.premium-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
}

.premium-message {
    text-align: center;
    padding: 20px;
}

.premium-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.premium-message h3 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 20px;
}

.premium-message p {
    margin: 0 0 20px 0;
    color: #6c757d;
    font-size: 14px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e8ecef;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: #27ae60;
}

.notification.error {
    background: #e74c3c;
}

.notification.info {
    background: #3498db;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .alert-types-grid {
        grid-template-columns: 1fr;
    }
    
    .conditions-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-section {
        flex-direction: column;
    }
    
    .setting-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .alert-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .advanced-alerts-section {
        background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
        color: white;
    }
    
    .alert-type-card,
    .condition-item,
    .setting-group,
    .alerts-list {
        background: #34495e;
        border-color: #5a6c7d;
        color: white;
    }
    
    .settings-input,
    .settings-select {
        background: #34495e;
        border-color: #5a6c7d;
        color: white;
    }
    
    .quiet-hours-config {
        background: #2c3e50;
        border-color: #5a6c7d;
    }
} 