/**
 * Dayboro Push Notifications - Frontend Styles
 * For use on WordPress pages (membership dashboard, etc.)
 */

.dayboro-push-settings-wrapper {
    max-width: 600px;
    margin: 20px 0;
}

.push-settings-title {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    color: #2E7D32;
}

.push-settings-help {
    background: #E8F5E9;
    border-left: 4px solid #4CAF50;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
}

.push-settings-help p {
    margin: 0;
    color: #1B5E20;
    font-size: 0.95rem;
}

.push-login-notice {
    background: #FFF8E1;
    border-left: 4px solid #FFC107;
    padding: 12px 15px;
    margin-top: 15px;
    border-radius: 0 8px 8px 0;
}

.push-login-notice p {
    margin: 0;
    color: #856404;
}

.push-login-notice a {
    color: #2E7D32;
    font-weight: 600;
}

.push-loading {
    padding: 30px;
    text-align: center;
    color: #666;
}

.push-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: push-spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes push-spin {
    to { transform: rotate(360deg); }
}

.push-error {
    color: #c62828;
    background: #FFEBEE;
    padding: 15px;
    border-radius: 8px;
}

/* Notification Settings Container */
.notification-settings {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
}

.notification-settings h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #333;
}

/* Toggle Switch */
.notification-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #4CAF50;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Category Groups */
.notification-categories {
    transition: opacity 0.3s;
}

.notification-categories.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.notification-categories > p {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 0.9rem;
}

.category-group {
    margin-bottom: 20px;
}

.category-group-header {
    font-weight: 600;
    color: #2E7D32;
    padding: 10px 0;
    border-bottom: 2px solid #E8F5E9;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.category-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin: 6px 0;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.category-option:hover {
    background: #e8f5e9;
}

.category-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4CAF50;
    cursor: pointer;
}

.category-option span {
    flex: 1;
    font-size: 0.95rem;
}

/* Save Button */
#save-notifications {
    width: 100%;
    margin-top: 15px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

#save-notifications:hover:not(:disabled) {
    background: #43A047;
}

#save-notifications:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Messages */
.notification-message {
    margin-top: 12px;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

.notification-message.success {
    background: #d4edda;
    color: #155724;
}

.notification-message.error {
    background: #f8d7da;
    color: #721c24;
}

.notification-message.warning {
    background: #fff3cd;
    color: #856404;
}

.notification-message.info {
    background: #d1ecf1;
    color: #0c5460;
}

.notification-unsupported,
.notification-denied {
    padding: 15px;
    background: #f8d7da;
    border-radius: 8px;
    color: #721c24;
}

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