@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root{
    --ck-color-focus-border: none;
    --global-nav-height: 72px;
    --app-subnav-height: 64px;
    --z-global-nav: 1030;
    --z-global-nav-dropdown: 1045;
    --z-app-subnav: 1010;
    --z-app-sidebar: 1005;
    --z-app-overlay: 1000;
}
html,body{
    /* background-color: #4489f7; */
    /* background-color: rgb(206, 199, 199, 0.2); */
    /* opacity: 0.54; */
    font-family: 'Roboto', sans-serif;
    height: 100%;
    color: #34353a;
    font-size: 15px;
}
img {
    max-width: 100%;
    height: auto !important;
}
.media{
    display: block;
}
/* Auth pages (login, register, etc.): keep logo small */
.auth-page-logo {
    max-height: 95px;
    width: auto !important;
    height: auto !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.email-body-content svg{
    max-width: 100%;
    height: auto !important;
}

.form-control{
    box-shadow: none !important;
    outline: none !important;
    border: none;
}


.single-mail.email-read{
    background: rgba(242,245,245,0.8);
    color: #5f6368;
}
.single-mail.email-unread{
    font-weight: 600;
    border-left: 3px solid #1a73e8;
}
.single-mail.fade{
    animation: fadeout 0.27s; 
    animation-fill-mode: forwards;
}
.single-mail.fade .btn-list{
    display: none;
}


#compose-view::-webkit-scrollbar-track
{
    background-color: #F5F5F5;
}

#compose-view::-webkit-scrollbar
{
    width: 6px;
    background-color: #F5F5F5;
}

#compose-view::-webkit-scrollbar-thumb
{
    background-color: #bbb8b8;
    
}

#compose-recipients{
    padding-left: 2rem;
}

#submit-btn{
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    padding: .5rem 2rem;
}

.ck-focused{
    box-shadow: none !important;
    outline: none !important;
}

.mail-subnav, .action_bar, .mailbox_head{
    box-shadow: inset 0 -1px 0 0 rgba(100,121,143,0.122);
}

.action_bar{
    box-shadow: inset 0 -1px 0 0 rgba(100,121,143,0.122);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    /* padding: .2rem .2rem; */
}
.action-bar-left{
    display: flex;
    align-items: center;
    gap: 0;
}
.action-bar-nav{
    display: inline-flex;
    align-items: center;
    gap: 0.05rem;
    padding: 0;
}
.action-bar-nav .btn-item{
    height: 36px;
    width: 36px;
    border-radius: 50%;
    opacity: 0.72;
}
.action-nav-position{
    min-width: 52px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #5f6368;
    letter-spacing: 0.02em;
}
.action-bar-nav .btn-item:disabled{
    opacity: 0.28;
    cursor: default;
    pointer-events: none;
}


.navbar-brand{
font-size: 1.6rem;
}
.nav-sidebar{
    display: flex;
    flex-direction: column;
}
.nav-sidebar .nav-link{
    display: block;
    cursor: pointer;
    /* margin-top: .5rem; */
}
.nav-sidebar .active{
    border-radius: 0px 20px 20px 0px;
    font-weight: bold;
    background-color: rgb(230, 230, 230);
}
#inbox.active {
    color: #d93025;
    background-color: rgb(255, 158, 147, 0.2);
}
/* .nav-link:focus:hover{
    border-radius: 0px 20px 20px 0px;
    background-color: rgb(230, 230, 230);
} */


.global-navbar .dropdown-menu {
    position: absolute;
    z-index: var(--z-global-nav-dropdown);
}

.srchbar{
    border-radius: 8px;
    border: 1px solid transparent;
    max-width: 780px;
    margin-left: 4.5rem;
    background-color: #f1f3f4;
}
.user-icon{
    padding: 6px 11px;
    font-size: 18px;
    font-weight: normal;
}
.user-icon-large{
    font-size: 38px;
    padding: 1rem 1.7rem;
    margin: 10px 5rem;
}
.username{
    white-space: nowrap;
    overflow: hidden !important;
    text-overflow: ellipsis;
    margin-top: 1rem;
}
.main{
    padding-left: 234px;  
    margin-top: var(--app-subnav-height);
    height: calc(100vh - var(--app-subnav-height));
    transition: all 0.3s;
}
.spread{
    padding-left: 0px; 
}
#compose,.logout{
    font-family: 'Open Sans', sans-serif;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: .5px;
    color: #3c4043;
    white-space: nowrap;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.302), 0 1px 3px 1px rgba(60,64,67,0.149);
    margin-top: 1.4rem;
    margin-left: 0.5rem;
    border-radius:  24px;
    max-width: 10rem;
    background-color: white;
    transition: box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

#compose:hover {
    box-shadow: 0 1px 3px 0 rgba(60,64,67,0.302), 0 4px 8px 3px rgba(60,64,67,0.149);
    background-color: #fafafb !important;
    text-decoration: none !important;
}
.plus-img{
    max-width: 32px;
    height: auto;
}
  /* Sidebar */
 #sidebar {
    position: fixed;
    min-width: 230px;
    max-width: 230px;
    height: calc(100vh - (var(--global-nav-height) + var(--app-subnav-height)));
    top: calc(var(--global-nav-height) + var(--app-subnav-height));
    left: 0;
    z-index: var(--z-app-sidebar);
    display: block;
    overflow-x: hidden;
    overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
    /* background: rgba(245,245,245); */
    /* border-right: 1px solid rgb(207, 207, 207); */
    transition: all 0.3s;
  }
#sidebar.side_active {
    margin-left: -250px;
}

.sidebar-logo, .overlay{
    display: none;
}

.user-icon-wrapper{
    display: flex;
    align-items: center;
    justify-content: center;
}
.singlemail-user-icon{
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
}
textarea {
    min-height: 400px;
}

.mail{
    position: relative;
    z-index: 5;
    
}
.single-mail{
    letter-spacing: .2px;
    padding: .65rem 1rem;
    margin: 3px 12px;
    background: #fff;
    border: none;
    border-radius: 24px;
    display: grid;
    grid-template-columns: 50px 28px minmax(120px,180px) minmax(0,1fr) 80px;
    grid-template-rows: auto minmax(0, auto);
    align-items: center;
    gap: 8px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.single-mail:hover{
    background: #f1f3f4;
    box-shadow: 0 1px 2px rgba(60,64,67,0.302), 0 1px 3px 1px rgba(60,64,67,0.149);
}
.single-mail:not(:last-child){
    border-bottom: none;
}


.time-text{
    font-size: 13px;
}
.star-wrapper{
    border: 0;
    background: transparent;
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.star{
    height: 20px;
    width: 20px;
    opacity: 0.65;
}

.sender-subject{
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    grid-column: 3 / 5;
    grid-row: 1;
}
.sender{
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 4px;
    max-width: 180px;
    min-width: 0;
    flex-shrink: 0;
    color: #1a73e8;
}
.sender-subject .separator{
    color: #5f6368;
    font-weight: 400;
    margin: 0 4px;
    flex-shrink: 0;
}
.sender-subject .subject-text{
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    color: #202124;
}
.snippet-preview{
    min-width: 0;
    grid-column: 3 / 5;
    grid-row: 2;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 4px;
    margin-top: -4px;
}
.snippet-preview .snippet-text,
.snippet-preview .text-muted{
    color: #5f6368;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.timestamp{
    text-align: right;
    white-space: nowrap;
    font-size: 13px;
    color: #5f6368;
    grid-column: 5;
    grid-row: 1 / 3;
    align-self: center;
}
.view-mail-btn-list{
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0 0 0 auto;
    gap: 0.15rem;
}
.back-btn{
    border-radius: 50%;
    opacity: 0.72;
}
.back-btn:disabled{
    opacity: 0.28;
    cursor: default;
    pointer-events: none;
}
#check-email .star{
    position: relative;
}
#check-email .star::after{
    top: -10px;
    left: -10px;
}
.btn-list{
    position: absolute;
    visibility: hidden;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0;
    margin: 0;
    top:2%;
    right:1%;
}
.btn-item{
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    height: 40px;
    width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px;
    cursor: pointer;
    opacity: .64;
}
.btn-item.extract-to-file{
    width: auto;
    min-width: 72px;
    padding: 0 0.45rem;
    border-radius: 4px;
    background-color: #4CAF50;
    color: #fff;
    opacity: 1;
}
.btn-item.extract-to-file:hover{
    background-color: #419444;
}
.btn-item-label{
    font-size: 0.75rem;
    margin-left: 0.25rem;
}
.mark-read,.delete,.del_forever {
    font-size: 1.1rem;
}
.star::after{
    content: '';
    display: block;
    position: absolute;
    z-index: -1;
    width: 40px;
    height: 40px;
    top: 0;
    left: 5px;
    transition-duration: .15s;
    transform: scale(0);
    transition-property: transform,opacity;
}
.star:active::after{
    animation: ripple .15s ease-out;
}
.fas.fa-star{
    color: #f2a365;
}
#trash{
    padding-left: 1.2rem;
}
.archive_btn{
    height: 18px;
 padding-right: 12px;
 padding-left: 8px;
}
.fa-slash{
    position:relative;
    font-size: 1.1rem;
}
.sing-sub{
    padding-left: 4rem;
    margin-top: 1rem;
    font-weight: normal;
}
.sing-detail{
    display: flex;
    margin-top: 1rem;
    margin-bottom: 2rem;
    flex: 1 1 auto;
}
.sing-username-wrapper{
    display: flex;
    flex-direction: column;
}
.sing-username{
    display: flex;
    flex-direction: column;
    padding-right: 10px;
}
.sing-username, .sing-timestamp{
    white-space: nowrap;
    overflow: hidden !important;
    text-overflow: ellipsis;  
}


.sing-timestamp{
    margin-left: auto;
}
.timestamp-icons{
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.detail-small{
    font-size: 12px;
}
.sing-icon-wrapper{
    position: relative;
    display: inline;
    padding-right: 4rem;
}
.sing-icon{
    position: absolute;
    width: 40px;
    text-align: center;
    padding: 2px 2px;
    font-size: 24px;
    font-weight: normal;
}
.sing-body{
    padding-left: 4rem;
}

/* Email body content styling for HTML emails */
.email-body-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    line-height: 1.6;
    overflow-x: auto;
}

/* Contain HTML email content and prevent layout breaking */
.email-body-content * {
    box-sizing: border-box;
}

/* Ensure images in emails are responsive */
.email-body-content img {
    max-width: 100% !important;
    height: auto !important;
}

/* Keep table layout mostly provider-authored while allowing horizontal scroll on container */
.email-body-content table {
    max-width: none;
}

.email-body-content table td,
.email-body-content table th {
    vertical-align: top;
}

/* Preserve author styling while preventing long links from breaking layout */
.email-body-content a {
    word-break: break-all;
}

/* Style lists in emails */
.email-body-content ul,
.email-body-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.email-body-content li {
    margin: 0.25rem 0;
}
.fa-reply{
    cursor: pointer;
}
.forward-icon{
    display: inline-block;
    transform: scaleX(-1);
}

.empty_icon{
    font-size: 9rem;
    color: #d93025;
    padding-left: 1rem;
}

.empty_text{
    font-size: 1.2rem;
    color:  #6c757d;
}

#myToast{
    width: 400px;
    position: fixed; 
    bottom: 0; 
    left: 2%;  
    z-index: 9999;
}
.hideToast{
 display: none;
}
.dropdown-tome{
    width: 20rem;
}
.table td{
    padding-top: 1px ;
    padding-bottom: 1px ;
}
.tome{
    position: absolute;
    text-overflow: ellipsis;
    overflow: hidden;
    width: 10rem;
}
/* css hover style */
@media (hover: hover) and (pointer: fine) {
    .nav-sidebar .nav-link:hover{
        border-radius: 0px 20px 20px 0px;
        background-color:  rgba(242,245,245,0.8);
    }
    .nav-sidebar .active:hover{
        border-radius: 0px 20px 20px 0px;
        font-weight: bold;
        background-color: rgb(230, 230, 230);
    }
    .star:hover{
        opacity: 1;
    }
    .single-mail:hover .time-text{
        display: none;
    }
    .single-mail:hover .btn-list{
        visibility: visible;
    }
    .btn-item:hover, .star:hover::after{
        opacity: 1;
        background-color: rgba(32, 33, 36, 0.075);
        border-radius: 50%;
        transform: scale(1);
        /* height: 200%; */
    }
}
@media (max-width: 907px) {
    /* .main{
        height: 89vh;
    } */
    .navbar-brand{
        display: none;
    }
    .active{
        pointer-events: auto;
    }
    .sidebar-logo{
        display: block;
        padding-left: 1rem;
    }
    .user-icon-wrapper{
        display: flex;
        order: 0;
    }
    .singlemail-user-icon{
        position: absolute;
        width: 37px;
        text-align: center;
        padding: 2px 2px;
        font-size: 22px;
        font-weight: normal;
        top: .9rem;
    }
    .single-mail{
        box-shadow: none;
        padding: .7rem 0;
        grid-template-columns: 44px 24px minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        border-radius: 16px;
    }
    .single-mail.email-read{
        background: rgba(242,245,245,0.8);
        color: #5f6368;
    }
    .single-mail.email-unread{
        border-left: 3px solid #1a73e8;
    }
    .timestamp{
        grid-column: 3;
        grid-row: 3;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.35rem;
        margin-left: 0;
    }

    .sender{
        padding-left: 0;
    }
    .sender-subject{
        grid-column: 3;
        grid-row: 1;
        max-width: 100%;
    }
    .subject-text{
        display: flex;
        flex-direction: column;
        font-size: 14px;
    }
    .star-wrapper{
        grid-column: 2;
        grid-row: 1;
        height: 32px;
        margin-left: 0;
    }
    .btn-list{
        position: static;
        visibility: visible;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 0.1rem;
    }
    .time-text{
        display: none;
    }
    .snippet-preview{
        grid-column: 3;
        grid-row: 2;
        margin-top: 0;
    }
    .sing-body{
        padding-left: .5rem;
    }
    .sing-sub{
        padding-left: 0rem;
        margin-top: 0rem;
    }
    .sing-detail{
        margin-bottom: 2rem;
    }
}
@media (max-width: 768px) {
    .action-nav-position{
        display: none;
    }
    .action-bar-nav .btn-item{
        height: 32px;
        width: 32px;
    }
    .view-mail-btn-list{
        gap: 0.05rem;
    }
    .tooltip {
        display: none !important;
    }
    .overlay {
        position: fixed;
        top: var(--global-nav-height);
        display: none;
        /* full screen */
        width: 100vw;
        height: calc(100vh - var(--global-nav-height));
        /* transparent black */
        background: rgba(0, 0, 0, 0.7);
        /* middle layer, i.e. appears below the sidebar */
        z-index: var(--z-app-overlay);
        opacity: 0;
        /* animate the transition */
        /* transition: all 0.5s ease-in-out; */
    }
    /* display .overlay when it has the .active class */
    .overlay.over_active {
        display: block;
        opacity: 1;
    }
    .srch-form{
        margin-right: 15px;
    }
    #sidebarCollapse{
        position: absolute;
        top: 13px;
        left: 20px;
        z-index: 1011;
    }
    .dropdown-user{
        position: absolute;
        top: 19px;
        right: 20px;
        z-index: 1011;
    }

    .srch_btn{
        display: none;
    }
    #sidebar {
        top: calc(var(--global-nav-height) + var(--app-subnav-height));
        height: calc(100vh - (var(--global-nav-height) + var(--app-subnav-height)));
        background-color: white;
        margin-left: -280px;
        min-width: 280px;
    }
    .sidebar-logo{
        margin-top: 2rem;
    }
    #sidebar.side_active {
        margin-left: 0;
    }
    
    .main{
        padding-left: 0;
    }

    .sender{
        font-size: 16px;
    }
    .subject-text{
        font-size: 14px;
    }
    .time-text{
        font-size: 12px;
    }
    .sing-icon-wrapper {
        padding-right: 3.5rem;
    }
    .sing-timestamp{
        margin-left: 0px;
    }
    .timestamp-icons{
        margin-left: auto;
    }
    .action_bar{
        position: fixed;
        top: calc(var(--global-nav-height) + var(--app-subnav-height));
        right: 0;
        left: 0;
        z-index: var(--z-app-subnav);
        padding: .3rem .2rem;
    }

    .mail-subnav, .mailbox_head {
        box-shadow: none;
    }
    .srchbar{
        margin-left: 15px;
        padding-left: 40px;
        padding-right: 40px;
        background: white;
        border: 2px solid #f1f3f4;
    }
    .mailbox_head{
        text-transform: uppercase;
        font-weight: normal;
        font-size: 14px;
        letter-spacing: .1rem;
    }
    #myToast{
    width: 80%;
    left: 3%;
    }
    .dropdown-tome{
    width: 15rem;
    left: -3rem;
    }
}

@keyframes fadeout {
    0% {
        max-height: initial;
        opacity: 1;
    }
    75%{
        max-height: initial;
        opacity: 0;
    }
    100% {
        max-height: 0;
        padding: 0;
        margin: 0;
        opacity:0;
    }
    } 

    @keyframes ripple {
        0% {
          opacity: 0;
          transform: scale(0);
        }
      
        100% {
          opacity: 1;
          transform: scale(1);
        }
      }
    
