/* =========================================
   GOOGLE DRIVE STYLE
========================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #202124;
    background: #ffffff;
    font-size: 14px;
    overflow: hidden;
}


/* =========================================
   TOP BAR
========================================= */

.topbar {
    height: 65px;
    width: 100%;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #dadce0;
    background: #ffffff;
    position: relative;
    z-index: 10;
}

.brand {
    width: 170px;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 18px;
    gap: 8px;
    flex-shrink: 0;
}

.brand .drive-logo {
    width: 27px;
    height: 25px;
    display: block;
    flex-shrink: 0;
}

.brand span {
    font-size: 20px;
    font-weight: 400;
    color: #202124;
    letter-spacing: -0.2px;
}


/* =========================================
   SEARCH
========================================= */

.search-wrapper {
    width: 470px;
    height: 42px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper > i {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #5f6368;
    pointer-events: none;
}

.search {
    width: 100%;
    height: 38px;
    border: none;
    outline: none;
    border-radius: 22px;
    background: #f1f3f4;
    padding: 0 18px 0 42px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #202124;
}

.search::placeholder {
    color: #5f6368;
    opacity: 1;
}

.search:focus {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.20);
}


/* =========================================
   TOP ACTIONS
========================================= */

.top-actions {
    margin-left: auto;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 16px;
}

.top-actions button {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    color: #5f6368;
    cursor: pointer;
    font-size: 15px;
}

.top-actions button:hover {
    background: #f1f3f4;
}

.profile {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #5f6368;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    margin-left: 2px;
}


/* =========================================
   MAIN LAYOUT
========================================= */

.layout {
    display: flex;
    width: 100%;
    height: calc(100vh - 65px);
}


/* =========================================
   SIDEBAR
========================================= */

.sidebar {
    width: 170px;
    height: 100%;
    flex-shrink: 0;
    border-right: 1px solid #dadce0;
    background: #ffffff;
    padding: 10px 8px;
    overflow: hidden;
}


/* =========================================
   NEW BUTTON
========================================= */

.new-btn {
    height: 44px;
    min-width: 82px;
    padding: 0 16px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;

    border: 1px solid #dadce0;
    border-radius: 22px;

    background: #ffffff;
    color: #202124;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;

    box-shadow:
        0 1px 2px rgba(60, 64, 67, 0.15);
}

.new-btn:hover {
    background: #f8fafd;

    box-shadow:
        0 1px 3px rgba(60, 64, 67, 0.25);
}

.new-btn i {
    font-size: 14px;
}


/* =========================================
   NAV ITEMS
========================================= */

.nav-item {
    height: 34px;
    width: 100%;

    display: flex;
    align-items: center;

    gap: 14px;
    padding: 0 14px;

    border-radius: 0 18px 18px 0;

    color: #3c4043;

    font-size: 13px;
    font-weight: 400;

    cursor: pointer;
}

.nav-item:first-of-type {
    margin-top: 10px;
}

.nav-item i {
    width: 17px;
    text-align: center;
    font-size: 14px;
    color: #3c4043;
}

.nav-item:hover {
    background: #f1f3f4;
}

.nav-item.active {
    background: #c2e7ff;
    color: #0b57d0;
    font-weight: 500;
}

.nav-item.active i {
    color: #0b57d0;
}


/* =========================================
   SEPARATORS
========================================= */

.sidebar-separator {
    height: 1px;
    background: #e0e0e0;
    margin: 10px 10px;
}


/* =========================================
   STORAGE
========================================= */

.storage {
    margin-top: 10px;
    padding: 0 12px;
}

.storage-title {
    height: 28px;

    display: flex;
    align-items: center;

    gap: 10px;

    color: #5f6368;

    font-size: 13px;
    font-weight: 400;
}

.storage-title i {
    font-size: 14px;
}

.storage-bar {
    width: 100%;
    height: 3px;

    margin-top: 6px;

    background: #dadce0;
    border-radius: 3px;

    overflow: hidden;
}

.storage-used {
    width: 15%;
    height: 100%;
    background: #5f6368;
}

.storage-text {
    margin-top: 7px;
    color: #5f6368;
    font-size: 11px;
    white-space: nowrap;
}

.storage-button {
    margin-top: 9px;

    height: 30px;
    padding: 0 12px;

    border: 1px solid #dadce0;
    border-radius: 15px;

    background: #ffffff;
    color: #0b57d0;

    font-size: 11px;
    font-weight: 500;

    cursor: pointer;
}

.storage-button:hover {
    background: #f8fafd;
}


/* =========================================
   CONTENT
========================================= */

.content {
    flex: 1;
    min-width: 0;
    height: 100%;

    padding: 22px 18px 0 18px;

    overflow: hidden;
}


/* =========================================
   BREADCRUMB
========================================= */

.breadcrumb-header {
    height: 32px;

    display: flex;
    align-items: center;

    width: 100%;
}

.breadcrumb {
    display: flex;
    align-items: center;

    height: 100%;

    gap: 13px;

    color: #3c4043;

    font-size: 14px;
    font-weight: 400;
}

.breadcrumb-title {
    white-space: nowrap;
    color: #3c4043;
}

.breadcrumb-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
}

.breadcrumb-chevron i {
    color: #5f6368;
    font-size: 9px;
}

.breadcrumb-dropdown {
    display: flex;
    align-items: center;
    margin-left: -8px;
}

.breadcrumb-dropdown i {
    color: #202124;
    font-size: 8px;
}

.breadcrumb-share {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1px;
}

.breadcrumb-share i {
    color: #5f6368;
    font-size: 12px;
}


/* =========================================
   FILTERS
========================================= */

.drive-filters {
    height: 38px;

    display: flex;
    align-items: center;

    gap: 6px;

    margin: 3px 0 7px;
}

.gemini-button,
.drive-filter {
    height: 30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 11px;

    border: 1px solid #dadce0;
    border-radius: 16px;

    background: #ffffff;
    color: #3c4043;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 12px;
    font-weight: 400;

    cursor: pointer;
}

.gemini-button {
    border-color: transparent;
    background: #d8e8ff;
    color: #0b57d0;
    font-weight: 500;
}

.gemini-button:hover {
    background: #c9ddfb;
}

.gemini-spark {
    font-size: 15px;
    line-height: 1;
}

.drive-filter:hover {
    background: #f8fafd;
}

.drive-filter > i:first-child {
    font-size: 12px;
    color: #3c4043;
}

.drive-filter > i:last-child {
    font-size: 8px;
    margin-left: 2px;
    color: #3c4043;
}

.filter-divider {
    width: 1px;
    height: 24px;

    margin: 0 7px 0 4px;

    background: #dadce0;
}


/* =========================================
   FILE TABLE
========================================= */

.shared-files {
    width: 100%;

    border-collapse: collapse;
    table-layout: fixed;

    margin-top: 0;
}


/* COLUMN WIDTHS */

.shared-files th:nth-child(1),
.shared-files td:nth-child(1) {
    width: 56%;
}

.shared-files th:nth-child(2),
.shared-files td:nth-child(2) {
    width: 17%;
}

.shared-files th:nth-child(3),
.shared-files td:nth-child(3) {
    width: 13%;
}

.shared-files th:nth-child(4),
.shared-files td:nth-child(4) {
    width: 10%;
}

.shared-files th:nth-child(5),
.shared-files td:nth-child(5) {
    width: 4%;
}


/* TABLE HEADER */

.shared-files thead {
    display: table-header-group;
}

.shared-files th {
    height: 28px;

    padding: 0 8px;

    border-bottom: 1px solid #dadce0;

    color: #5f6368;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 10px;
    font-weight: 400;

    text-align: left;

    white-space: nowrap;
}

.shared-files th:first-child {
    padding-left: 8px;
}

.shared-files th:nth-child(2),
.shared-files th:nth-child(3),
.shared-files th:nth-child(4) {
    text-align: left;
}

.shared-files th:last-child {
    text-align: right;
    padding-right: 8px;
}


/* NAME HEADER */

.column-title {
    display: inline-flex;
    align-items: center;

    gap: 3px;

    color: #5f6368;

    font-size: 10px;
    font-weight: 400;
}

.column-title i {
    color: #1a73e8;
    font-size: 9px;
}


/* SORT HEADER */

.sort-column {
    display: flex;

    justify-content: flex-end;
    align-items: center;

    gap: 5px;

    color: #5f6368;

    font-size: 10px;
    font-weight: 400;
}

.sort-column i {
    font-size: 9px;
}


/* =========================================
   TABLE ROWS
========================================= */

.shared-files tbody tr {
    height: 34px;
    border-bottom: 1px solid #eeeeee;
}

.shared-files tbody tr:hover {
    background: #f8fafd;
}

.shared-files tbody tr.selected-row {
    background: #f1f3f4;
}

.shared-files td {
    height: 34px;

    padding: 0 8px;

    color: #3c4043;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 11px;
    font-weight: 400;

    white-space: nowrap;

    overflow: hidden;
    text-overflow: ellipsis;
}

.shared-files td:nth-child(2),
.shared-files td:nth-child(3),
.shared-files td:nth-child(4) {
    text-align: left;
}

.shared-files td:last-child {
    text-align: right;
    padding-right: 7px;
}


/* =========================================
   FILE NAME
========================================= */

.file-name {
    display: flex;
    align-items: center;

    gap: 10px;

    min-width: 0;
}

.filename-text {
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;

    color: #202124;

    font-size: 11px;
    font-weight: 400;
}


/* =========================================
   PDF ICON
========================================= */

.pdf-icon {
    width: 16px;
    height: 19px;

    flex: 0 0 16px;

    position: relative;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    background: #f44336;

    border-radius: 2px;

    overflow: hidden;
}

.pdf-icon::before {
    content: "";

    position: absolute;

    top: 0;
    right: 0;

    width: 5px;
    height: 5px;

    background: #ffffff;

    clip-path: polygon(
        0 0,
        100% 100%,
        100% 0
    );
}

.pdf-icon span {
    position: absolute;

    bottom: 3px;
    left: 0;

    width: 100%;

    text-align: center;

    color: #ffffff;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 4px;
    font-weight: 700;

    line-height: 1;
}


/* =========================================
   OWNER
========================================= */

.owner {
    display: flex;
    align-items: center;

    gap: 7px;

    white-space: nowrap;
}

.owner > span:last-child {
    color: #3c4043;
    font-size: 11px;
    font-weight: 400;
}

.avatar {
    width: 18px;
    height: 18px;

    flex: 0 0 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #6b7075;
    color: #ffffff;

    font-size: 8px;
    font-weight: 500;
}


/* =========================================
   ROW MENU
========================================= */

.row-menu {
    width: 28px;
    height: 28px;

    border: none;
    background: transparent;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #5f6368;

    cursor: pointer;

    border-radius: 50%;
}

.row-menu:hover {
    background: #e8eaed;
}

.row-menu i {
    font-size: 12px;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 900px) {

    .sidebar {
        width: 150px;
    }

    .brand {
        width: 150px;
    }

    .search-wrapper {
        width: 350px;
    }

    .shared-files th:nth-child(1),
    .shared-files td:nth-child(1) {
        width: 48%;
    }

    .shared-files th:nth-child(2),
    .shared-files td:nth-child(2) {
        width: 20%;
    }

    .shared-files th:nth-child(3),
    .shared-files td:nth-child(3) {
        width: 15%;
    }

    .shared-files th:nth-child(4),
    .shared-files td:nth-child(4) {
        width: 12%;
    }

    .shared-files th:nth-child(5),
    .shared-files td:nth-child(5) {
        width: 5%;
    }
}


/* =========================================
   CHECKING FOR UPDATE OVERLAY
========================================= */

.update-overlay {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    /*
       Very light dimming.
       No blur.
    */
    background: rgba(255, 255, 255, 0.18);

    backdrop-filter: none;
    -webkit-backdrop-filter: none;

    z-index: 9999;

    /*
       Hidden initially.
    */
    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}


/* SHOW CHECKING POPUP */

.update-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================================
   CHECKING POPUP
========================================= */

.update-popup {
    width: 390px;
    min-height: 245px;

    padding: 32px 34px 28px;

    background: #ffffff;

    border: 1px solid #dadce0;

    border-radius: 12px;

    box-shadow:
        0 4px 12px rgba(60, 64, 67, 0.20),
        0 10px 25px rgba(60, 64, 67, 0.12);

    text-align: center;

    font-family: Arial, Helvetica, sans-serif;

    transform: translateY(8px) scale(0.98);

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}

.update-overlay.show .update-popup {
    transform: translateY(0) scale(1);
}


/* =========================================
   LOADER
========================================= */

.update-loader {
    width: 48px;
    height: 48px;

    margin: 0 auto 22px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-ring {
    width: 38px;
    height: 38px;

    border: 4px solid #e8eaed;

    border-top-color: #1a73e8;

    border-radius: 50%;

    animation: updateRoll 0.9s linear infinite;
}

@keyframes updateRoll {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* =========================================
   CHECKING TITLE
========================================= */

.update-popup h2 {
    margin: 0 0 12px;

    color: #202124;

    font-size: 20px;
    line-height: 28px;

    font-weight: 500;
}


/* =========================================
   CHECKING DESCRIPTION
========================================= */

.update-popup p {
    margin: 0 auto;

    max-width: 310px;

    color: #5f6368;

    font-size: 14px;
    line-height: 21px;

    font-weight: 400;
}


/* =========================================
   CHECKING STATUS
========================================= */

.update-status {
    margin-top: 20px;

    color: #5f6368;

    font-size: 12px;
    line-height: 18px;
}


/* =========================================
   UNSUPPORTED DEVICE SCREEN
========================================= */

.device-block {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f8fafd;

    font-family: Arial, Helvetica, sans-serif;

    text-align: center;
}

.device-block-content {
    width: 500px;
    max-width: calc(100% - 40px);
}

.device-drive-logo {
    width: 58px;
    height: 52px;

    margin-bottom: 25px;
}

.device-block h2 {
    margin: 0 0 14px;

    color: #202124;

    font-size: 24px;
    line-height: 32px;

    font-weight: 500;
}

.device-block p {
    margin: 0;

    color: #5f6368;

    font-size: 15px;
    line-height: 24px;
}


/* =========================================
   COMPLETED UPDATE POPUP
========================================= */

.popup-container {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    /*
       Same light background as checking popup.
       The Drive page remains clearly visible.
    */
    background: rgba(255, 255, 255, 0.18);

    backdrop-filter: none;
    -webkit-backdrop-filter: none;

    z-index: 10000;

    /*
       IMPORTANT:
       Hidden when page first loads.
    */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}


/* SHOW COMPLETED POPUP */

.popup-container.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================================
   COMPLETED POPUP BOX
========================================= */

.popup {
    width: 430px;
    max-width: calc(100% - 40px);

    padding: 32px;

    background: #ffffff;

    border: 1px solid #dadce0;

    border-radius: 12px;

    box-shadow:
        0 4px 12px rgba(60, 64, 67, 0.15),
        0 8px 28px rgba(60, 64, 67, 0.15);

    font-family: Arial, Helvetica, sans-serif;

    color: #202124;

    transform: translateY(8px) scale(0.98);

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}

.popup-container.show .popup {
    transform: translateY(0) scale(1);
}


/* =========================================
   POPUP LOGO
========================================= */

.popup-logo {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 22px;
}

.popup-drive-logo {
    width: 32px;
    height: 29px;

    flex-shrink: 0;
}

.popup-logo h4 {
    margin: 0;

    font-size: 18px;
    font-weight: 500;

    color: #202124;
}


/* =========================================
   COMPLETED POPUP TITLE
========================================= */

.popup h1 {
    margin: 0 0 14px;

    font-size: 24px;

    font-weight: 500;

    line-height: 1.3;

    color: #202124;
}


/* =========================================
   COMPLETED POPUP TEXT
========================================= */

.popup p {
    margin: 10px 0;

    font-size: 14px;

    line-height: 1.55;

    color: #5f6368;
}


/* =========================================
   INSTRUCTIONS
========================================= */

.popup-instructions {
    margin-top: 22px;

    padding: 16px;

    background: #f8fafd;

    border-radius: 8px;
}

.popup-instructions p {
    margin-top: 0;

    color: #3c4043;
}

.popup-instructions ul {
    margin: 10px 0 0;

    padding-left: 20px;

    color: #5f6368;

    font-size: 13px;

    line-height: 1.8;
}


/* =========================================
   DOWNLOAD BUTTON
========================================= */

.download-btn {
    width: 100%;
    height: 42px;

    margin-top: 22px;

    border: none;

    border-radius: 21px;

    background: #1a73e8;

    color: #ffffff;

    font-size: 14px;

    font-weight: 500;

    cursor: pointer;
}

.download-btn:hover {
    background: #185abc;
}

.download-btn:active {
    background: #174ea6;
}


/* =========================================
   SMALL SCREEN SAFETY
========================================= */

@media (max-width: 600px) {

    .update-popup {
        width: calc(100% - 40px);
        padding: 28px 24px;
    }

    .popup {
        width: calc(100% - 40px);
        padding: 28px 24px;
    }
}