/* Notification Panel Styles */
.notification-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 0 20px 20px;
    padding: 15px 20px;
    animation: fadeIn 0.3s ease-in-out;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.notification-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.notification-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.notification-setting-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.notification-setting-row span {
    font-weight: 600;
    font-size: 0.9rem;
}

.notification-setting-row label {
    font-weight: 600;
    font-size: 0.9rem;
}

.notification-setting-row input[type="number"] {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.checkbox-group {
    display: flex;
    gap: 20px;
}

/* Toggle Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.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;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

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

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Checkbox Styles */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #eee;
    border-radius: 3px;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Test Button Styles */
.notification-test {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.notification-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.notification-button:hover {
    background-color: var(--secondary-color);
}

/* In-App Notification Styles */
#in-app-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
    width: 100%;
}

.in-app-notification {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px;
    position: relative;
    border-left: 5px solid var(--primary-color);
    animation: slideIn 0.3s ease-in-out;
    transform-origin: top right;
}

.in-app-notification.source-koeri {
    border-left-color: var(--koeri-color);
}

.in-app-notification.source-afad {
    border-left-color: var(--afad-color);
}

.in-app-notification.notification-medium {
    border-width: 5px;
    background-color: #fff8e6;
}

.in-app-notification.notification-high {
    border-width: 5px;
    background-color: #fff5f5;
}

.notification-close {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 18px;
    cursor: pointer;
    color: #666;
}

.notification-title {
    font-weight: 700;
    margin-bottom: 8px;
    padding-right: 20px;
    font-size: 1rem;
}

.notification-body {
    font-size: 0.9rem;
    white-space: pre-line;
}

.notification-closing {
    animation: fadeOut 0.3s ease-in-out forwards;
}

/* Animation Keyframes */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

/* Media Queries */
@media (max-width: 768px) {
    .notification-setting-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 10px;
    }
    
    #in-app-notification-container {
        max-width: calc(100% - 40px);
    }
}
