$primary-color: #2b2d42;
$secondary-color: #ffba2fd7;
$accent-color: #ffb700;
$text-color: #fff875;
$background-color: #2f4858;
$border-color: #1e8576;
$shadow-color: rgba(0, 0, 0, 0.2);
$background-color-seethrough: #2f485800;
$text-color2: #c7c7c7;

body {
    background-color: var(--background-color);
}

.all-info {
    background-color: var(--background-color);
    
}

.plugin-text {
  color: var(--text-color2);
}

p {
    color: var(--text-color);
    margin-top: 0;
    padding-top: 0;
    font-size: 1rem;
}

.user-info {
    width: 100vw;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1rem;
    justify-content: center;
    min-height: 70vh;
    p {
        margin-bottom: 1rem;
    }
}

.Section {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--primary-color);
    box-shadow: var(--shadow-color) 0px 8px 16px;
    width: 40vw;
    height: auto;
    margin: 1rem;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;

    &:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-color) 0px 12px 24px;
    }
}

.usage-bar {
    background-color: var(--div-color);
    border-radius: 5px;
    height: 8px;
    width: 100%;
    margin-bottom: 1rem;
}

.usage-progress {
    background-color: var(--accent-color);
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

.usage-text {
    margin-top: 0.5rem;
    color: var(--text-color);
    font-weight: bold;
}


.name-text {
    color: var(--text-color);
    font-size: 2.5rem;
    padding-top: 2.5rem;
    margin-bottom: 1rem;
    width: fit-content;
    margin-left: 7vw;
    margin-top: 5rem;
}

.api-key-handling {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--primary-color);
    box-shadow: var(--shadow-color) 0px 8px 16px;
    border: 1px solid var(--border-color);
    height: auto; 
    border-radius: 10px;
    width: 40vw;
    margin: 1rem;
    padding: 1rem;
    max-height: 139px;
    min-height: 139px;
}

.api-key-display {
    display: flex;
    flex-direction: row;
    position: relative;
    align-items: center;
    justify-content: center;
}

.obfuscation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background-image: linear-gradient(to right, var(--primary-color) 0%, var(--div-color) 50%, var(--background-color-seethrough) 100%);
    border-radius: 10px;
}

.obfu {
    position: relative;
    z-index: 5;
    p {
        margin-bottom: 0;
        color: var(--text-color);
    }
}

.api-buttons {
    background-color: var(--plugin-description-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
    border: solid 1px var(--border-color);
    margin: 0.5rem;

    &:hover {
        background-color: var(--accent-color);
        box-shadow: var(--shadow-color) 0px 4px 6px;
    }
}

.generate {
    margin-top: 10px;
}

.usage-info {
    width: 100%;
    p {
        font-size: 1rem;
        text-align: center;
        color: var(--text-color);
    }
}

.email {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--primary-color);
    border-radius: 10px;
    height: auto;
    margin: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);

    input {
        margin-top: 10px;
        padding: 10px;
        border: 1px solid var(--border-color);
        border-radius: 5px;
        width: 90%;
        background-color: var(--submenu-background-color);
        color: var(--text-color); 
        transition: box-shadow 0.3s ease-in-out;
        &:focus {
            outline: none;
            border: none;
            box-shadow: 0 0 5px var(--text-color);
        }
    }
}

.email p {
    font-size: 1rem;
}

.plugins-section {
  width: 100vw;
  margin-top: 2rem;
  margin-bottom: 2rem;
  
  h2 {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 1rem;
  }
}

.plugin-grid {
  display: flex;
  justify-content: center;
  flex-direction: row;
  flex-wrap: wrap;
}

.plugin-box {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    width: 100px;
    height: 100px;
    margin: 1rem;
    z-index: 25px;
  
    &:hover {
      transform: translateY(-5px);
      box-shadow: var(--shadow-color) 0px 8px 16px;
      z-index: 30px;
    }
  
    svg {
      width: 50px;
      height: 50px;
      margin-bottom: 0.5rem;
    }
  
    p {
      margin: 0;
      text-align: center;
    }
  }

@media screen and (max-width: 480px) {
  .plugin-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.email-btn-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.email-error {
    color: #ef233c;
    font-size: 0.8rem;
    margin-top: 10px;
}

.returnEmails {
    display: flex;
    justify-content: center;
}

@media screen and (max-width: 820px) {
    .api-key-handling {
        width: 80vw;
        max-height: 200px;
        height: fit-content;
        p {
            font-size: 1rem;
        }
    }
    .Section {
        width: 90vw;
    }
    .api-key-display {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        button {
            width: 50%;
            margin-top: 10px;
        }
    }
    .name-text {
        font-size: 2rem;
        margin-left: 1rem;
    }
}


.telegram-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--primary-color);
    border-radius: 10px;
    border: 1px solid var(--secondary-color);
    width: 40vw;
    height: fit-content;
    padding: 1rem;
    z-index: 25;
    opacity: 0;
    animation: showModal 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
    box-shadow: 0 0 5px var(--text-color), rgba(0, 0, 0, 0.56) 0px 22px 70px 4px, rgba(0, 0, 0, 0.56) 0px -22px 70px -4px;
  }
  
  @keyframes showModal {
    0% {
      transform: rotateY(30deg) translateY(-300px) skewY(-30deg);
      opacity: 0;
    }
    100% {
      transform: rotateY(0deg) translateY(0) skewY(0deg);
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);

    }
  }

  .plugin-title {
    color: var(--text-color2);
    font-size: 1.5rem;
    margin-bottom: 0px;
  }

  .plugin-description {
    color: var(--text-color2);
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--text-color2);
    cursor: pointer;
    transition: color 0.3s ease-in-out;
    background-color: transparent;
    border: none;
    &:hover {
      color: var(--text-color);
    }
}

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

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--div-color);
    box-shadow: 0 0 3px var(--text-color);
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:hover {
    transform: scale(1.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: var(--primary-color);
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--accent-color);
    border: 1px solid var(--border-color);
}

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

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

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

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

.flex-row {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content:center;
}

@media screen and (max-width: 800px) {
    .telegram-modal {
        width: 90vw;
        border-radius: 10px;
        border: 1px solid var(--secondary-color);
        height: fit-content;
        padding: 1rem;
        z-index: 25;
        opacity: 0;
        animation: showModal 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
        box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
    }
}

.toggle {
    padding-bottom: 0px;
    margin-bottom: 0px;
}

.telegram-switch {
    margin-top: 1rem;
}

.telegram-unlink-button {
    background-color: var(--secondary-color);
    color: var(--text-color2);
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color, box-shadow 0.3s ease-in-out;
    border: solid 1px var(--border-color);
    margin: 0.5rem;

    &:hover {
        background-color: var(--accent-color);
        box-shadow: var(--shadow-color) 0px 4px 6px;
    }
}

#discord-input {
    width: 90%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: var(--div-color);
    color: var(--text-color);
}

#discord-input:focus {
        outline: none;
        border: none;
        box-shadow: 0 0 5px var(--text-color);
    }

.slack-description {
    margin-bottom: 0px;
}

.channelName {
    margin-bottom: 5px;
    margin-top: 5px;
    background-image: linear-gradient(45deg, #29e1fd, #e3bc20);
    text-align: left;
    color: $primary-color;
    padding: 5px;
    border-radius: 30px;
    box-shadow: 0 0 5px var(--text-color);

}

.center-align {
    margin-left: auto;
    margin-right: auto;
}

.maintain-n8n-logo {
    position: relative;
    height: 60px;
    width: 180px;
}

.plugin-product-description {
    margin-top: 10px;
    color: var(--plugin-description-color);
    font-size: 1rem;
    line-height: 1.5rem;
}

.read-docs {
    margin-top: 0px;
    color:$text-color2;
    font-size: 1rem;
    line-height: 1.5rem;
    cursor: pointer;
    padding: 2px;
    border-radius: 20px;
    background-color: #444766;
    border: 1px solid var(--div-color);
    box-shadow: 0 0 5px var(--shadow-color);
    transition: background-color 0.3s ease-in-out;
}

.read-docs:hover {
  background-color:#303249;
}

.misc-addons {
    display: flex;
    align-items: center;
    height: auto;
    width: 100vw;
    margin: auto;
    justify-content: center;
}

.allowed-domains {
    width: 100%;
    max-width: 100%;
    margin-left: 1rem;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    overflow-x: scroll;
    overflow-y: scroll;
    position: relative; 
    height: fit-content;
    z-index: 1; /* Allow hover to increase if needed */
    
    p {
        margin: .5rem;
        color: var(--text-color);
        font-size: .8rem;
        background-color: var(--div-color);
        padding: 5px;
        border-radius: 10px;
        box-shadow: 0 0 5px var(--shadow-color);
        margin-top: 0px;
    }
}

.flex-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.x {
    position: absolute;
    top: -4px; 
    right: -4px;
    z-index: 100;
    background: none; 
    border: none; 
    cursor: pointer; 
    font-size: 0.7rem; 
    color: var(--text-color); 
} 

.allowed-domains > div {
    position: relative;
    display: inline-block; /* Ensure each domain and button pair is inline */
    margin-right: 1rem; /* Add some spacing between domain elements */
}