/*  notification-permissions.css
    Purpose        UI/UX styling for the “Notification Permissions” page:
                     • permission list with custom toggle-switches
                     • info-tooltip system and modal walkthrough
                     • collapsible “More settings” section
                     • dark-theme defaults with CSS-vars, responsive down to ≤ 768 px

    Load-order     After core theme variables and before page-specific JS:
                     <link rel="stylesheet" href="css/core-theme.css">
                     <link rel="stylesheet" href="css/notification-permissions.css">

    Last updated   31 Jul 2025
*/


/* ============================================
   1. Colors and Common Properties
============================================ */
:root {
    --primary-color: #4EA1D3;
    --light-bg-color: #1e1e1e;
    --light-text-color: #ECF0F1;
    --placeholder-color: #767676;
    --hover-bg-color: #3a89b2;
    --tooltip-bg-color: var(--primary-color);
    --tooltip-text-color: white;
}

/* ============================================
   2. Main Content Styling
============================================ */
main {
    max-width: 800px;
    margin: 100px auto 50px auto;
    padding: 20px;
    text-align: center;
    color: var(--light-text-color);
}

h1 {
    margin-bottom: 20px;
    font-size: 32px;
}

p {
    margin-bottom: 30px;
    font-size: 18px;
}

/* ============================================
   3. Notification Permissions Container
============================================ */
.notification-permissions-container {
    margin: 20px auto;
    background-color: #2c2c2c;
    border-radius: 10px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1200px;
    padding: 20px 50px;
    border: 1px solid #cccccc;
    margin-top: -20px;
}

/* ============================================
   4. Notification Items Styling
============================================ */
.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.notification-label {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.notification-name {
    margin-left: 10px;
    margin-top: 8px;
    font-size: 16px;
    color: var(--light-text-color);
    text-align: left;
}

#coming-soon{
    color: #919191; !important;
}

/* ============================================
   5. Tooltip Styling
============================================ */
.tooltip {
    position: relative;
    margin-right: 10px;
}

.tooltip-text {
    position: absolute;
    bottom: 110%; /* Positioned above the icon */
    left: 50%;
    transform: translateX(-50%);
    visibility: hidden;
    opacity: 0;
    background-color: var(--tooltip-bg-color);
    color: var(--tooltip-text-color);
    padding: 8px 16px; /* Balanced padding */
    border-radius: 12px; /* Rounded corners */
    font-size: 12px;
    white-space: normal; /* Allow wrapping */
    max-width: 400px; /* Limit the tooltip width */
    min-width: 200px; /* Ensure a baseline width */
    width: auto; /* Let the width adjust dynamically */
    transition: visibility 0.3s, opacity 0.3s;
    z-index: 10;
    text-align: center;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.info-icon {
    position: relative;
    background-color: var(--primary-color);
    color: var(--tooltip-text-color);
    width: 24px;
    height: 24px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 14px;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.info-icon:hover {
    background-color: var(--hover-bg-color);
}



/* ============================================
   6. Toggle Switch Styling
============================================ */
/* Toggle Switch Container */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
    margin-left: auto;
}

/* Hide Default Checkbox */
.toggle-switch input {
    display: none;
}

/* Slider (Background) */
.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 25px;
    transition: 0.4s;
}

/* Slider Circle */
.slider:before {
    position: absolute;
    content: "";
    height: 17px;
    width: 17px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
}

/* Toggle On State */
input:checked + .slider {
    background-color: #4EA1D3;
}

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


/* ============================================
   7. Modal Styling
============================================ */
.no-selection-modal,
#netWorthModal,
#baseCurrencyModal,
#assetTypeModal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    display: flex;
}

.modal-content {
    background-color: var(--primary-color);
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    color: #fff;
    margin: auto;
}

.modal-content p,
.modal-content h2 {
    font-size: 18px;
}

.modal-content h2 {
    margin-bottom: 10px;
    font-size: 24px;
}

.notification-permissions-modal-buttons button,
.no-selection-modal-content button,
#baseCurrencyModal .close-button,
#assetTypeModal .close-button {
    background-color: #fff;
    color: #333;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.notification-permissions-modal-buttons button:hover,
.no-selection-modal-content button:hover,
#baseCurrencyModal .close-button:hover,
#assetTypeModal .close-button:hover {
    background-color: #e0e0e0;
}


/* ============================================
   7a. Permission Modal Styling
============================================ */
#notificationPermissionModal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent background */
    justify-content: center;
    align-items: center;
}

#notificationPermissionModal .modal-content {
    background-color: var(--primary-color); /* Use the primary color */
    padding: 20px;
    border-radius: 10px;
    width: 100%; /* 20% wider than the original (80% to 96%) */
    max-width: 500px; /* Increase max width to maintain proportionality */
    text-align: center; /* Center-align modal content */
    color: #fff; /* Ensure text color is readable */
    margin: auto;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25); /* Add box shadow for depth */
}

#notificationPermissionModal .modal-content h2 {
    margin-bottom: 15px; /* Add spacing below heading */
    font-size: 24px; /* Adjust heading font size */
    text-align: center; /* Keep the heading centered */
}

#notificationPermissionModal .modal-content p {
    text-align: center; /* Center-align text paragraphs */
    margin-bottom: 16px; /* Add spacing between paragraphs */
    line-height: 1.6; /* Improve readability */
}

#notificationPermissionModal .modal-content ol {
    text-align: left; /* Left-align ordered list items */
    margin: 10px 0; /* Add spacing between lists and other elements */
    padding-left: 20px; /* Indent list items */
}

#notificationPermissionModal .modal-content li {
    margin-bottom: 8px; /* Add spacing between list items */
    line-height: 1.5; /* Improve list readability */
}

#notificationPermissionModal .modal-content label {
    display: block;
    text-align: center;
    font-size: 14px;
    margin: 16px 0; /* Add spacing above and below the label */
    color: #ddd; /* Slightly lighter text for subtle appearance */
    cursor: pointer; /* Add a pointer cursor for better UX */
}

/* Style for the checkbox */
#notificationPermissionModal .modal-content label input[type="checkbox"] {
    appearance: none; /* Remove default styling */
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    vertical-align: middle;
    cursor: pointer;
    background-color: #fff; /* Set background to white by default */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Change background and tick color when checked */
#notificationPermissionModal .modal-content label input[type="checkbox"]:checked {
    background-color: #fff; /* Keep the background white when checked */
    border-color: #4EA1D3; /* Change the border color to match the tick */
}

#notificationPermissionModal .modal-content label input[type="checkbox"]:checked::after {
    content: '✔'; /* Add tick */
    color: #4EA1D3; /* Tick color */
    font-size: 14px;
    position: absolute;
    top: 2px;
    left: 2px;
}


/* Close button */
#notificationPermissionModal .close-button {
    background-color: #fff; /* White button background */
    color: #333; /* Dark text for the button */
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: background-color 0.3s, color 0.3s; /* Smooth transitions */
}

#notificationPermissionModal .close-button:hover {
    background-color: #e0e0e0; /* Light gray hover background */
}








/* ============================================
   8. Collapasible Section
============================================ */


/* Collapsible Section Styling */
.collapsible-section {
    margin-top: 30px;
}

.collapsible-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    color: var(--light-text-color);
    cursor: pointer;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.collapsible-content {
    display: none;
    margin-top: 10px;
}

/* Toggle Button Styling */
.collapsible-toggle {
    background: none;
    border: none;
    color: var(--light-text-color);
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.collapsible-toggle.open {
    transform: rotate(180deg);
}
