/* Push Notification System Styles */

/* Notification Controls */
.notification-controls {
    margin: 10px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notification-controls .switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-right: 10px;
}

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

.notification-controls .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.notification-controls .slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.notification-controls input:checked+.slider {
    background-color: #007bff;
}

.notification-controls input:focus+.slider {
    box-shadow: 0 0 1px #007bff;
}

.notification-controls input:checked+.slider:before {
    transform: translateX(26px);
}

.notification-controls .control-label {
    margin-left: 10px;
    margin-right: 25px;
    font-weight: 500;
    color: #495057;
    vertical-align: middle;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.status-indicator.connecting {
    background: linear-gradient(45deg, #6c757d, #5a6268);
    animation: pulse 2s infinite;
}

.status-indicator.connected {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.status-indicator.denied {
    background: linear-gradient(45deg, #dc3545, #c82333);
}

.status-indicator.error {
    background: linear-gradient(45deg, #dc3545, #bd2130);
    animation: shake 0.5s;
}

.status-indicator.playing {
    background: linear-gradient(45deg, #007bff, #0056b3);
    animation: pulse 1s infinite;
}

/* Animations */
@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Notification Toast Styles */
.toast-success {
    background-color: #28a745 !important;
}

.toast-error {
    background-color: #dc3545 !important;
}

.toast-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.toast-info {
    background-color: #17a2b8 !important;
}

/* Notification Permission Alert */
.notification-permission-alert {
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    color: #856404;
}

.notification-permission-alert ol {
    margin-bottom: 0;
    padding-left: 20px;
}

.notification-permission-alert li {
    margin-bottom: 5px;
}

/* Test Notification Cards */
.test-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.test-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.test-card .btn {
    width: 100%;
    margin-top: 10px;
}

/* Volume Control */
.volume-control {
    margin: 10px 0;
}

.volume-control input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.volume-control input[type="range"]:hover {
    opacity: 1;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-controls {
        padding: 10px;
    }

    .notification-controls .control-label {
        display: block;
        margin: 5px 0;
    }

    .status-indicator {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .notification-controls {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        border-color: #4a5568;
    }

    .notification-controls .control-label {
        color: #e2e8f0;
    }

    .notification-permission-alert {
        background: linear-gradient(135deg, #744210 0%, #975a16 100%);
        border-color: #975a16;
        color: #fef5e7;
    }
}