/*
 * ui and item name on mobile portrait
 */
@media screen and (orientation: portrait) and (min-device-width: 320px) and (max-device-width: 1024px) and (min-device-height: 600px) and (max-device-height: 1280px) and (-webkit-min-device-pixel-ratio: 1.5),
screen and (orientation: portrait) and (min-device-width: 600px) and (max-device-width: 1280px) and (min-device-height: 320px) and (max-device-height: 1024px) and (-webkit-min-device-pixel-ratio: 1) {

  /**************************************
    * left menu
   **************************************/
  .nav-side-menu {
    width: 50px;
  }
  .nav-side-menu.expand {
    width: 200px;
  }

  .nav-side-menu .app-logo img.small-size {
    left: -8px;
    opacity: 1;
  }
  .nav-side-menu.expand .app-logo img.small-size {
    opacity: 0;
  }

  .user-profile .show-user-detail i.fa-chevron-circle-down {
    display: none;
  }

  .current-page-menu ul {
    right: -7px;
  }
  .user-profile .avatar-dropdown-container {
    left: 4px;
  }
  .nav-side-menu .menu-list li {
    padding: 0 0 0 12px;
  }
  .nav-side-menu .menu-list ul.active,
  .nav-side-menu .menu-list li.active {
    padding-left: 5px;
  }

  /**************************************
   * menu bar
   **************************************/
  .toolbar .search-input {
    left: 15px;
    right: -15px;
  }

  /*************************************
   * menu bar and main content
   **************************************/
  #main-content,
  .secondary-bar {
    left: 50px;
  }

  /**************************************
   * main content
   **************************************/
  .small-view .open-text {
    max-width: 200px;
  }
}


/* mobile */
@media screen and (orientation: portrait) and (min-device-width: 320px) and (max-device-width: 414px) and (min-device-height: 480px) and (max-device-height: 812px) and (-webkit-min-device-pixel-ratio: 1.5),
screen and (orientation: landscape) and (min-device-width: 480px) and (max-device-width: 812px) and (min-device-height: 320px) and (max-device-height: 414px) and (-webkit-min-device-pixel-ratio: 1.5),

/* iPad 3, 4, Air, Air2 | iPad Pro 9.7 | iPad Pro | iPad mini 2, 3, 4 */
/*screen and (orientation: portrait) and (min-device-width: 768px) and (max-device-width: 1024px) and (min-device-height: 1024px) and (max-device-height: 1366px) and (-webkit-device-pixel-ratio: 2),
screen and (orientation: landscape) and (min-device-width: 1024px) and (max-device-width: 1366px) and (min-device-height: 768px) and (max-device-height: 1024px) and (-webkit-device-pixel-ratio: 2),*/

/* iPad 1, 2 | iPad mini */
screen and (orientation: portrait) and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 1),
screen and (orientation: landscape) and (device-width: 1024px) and (device-height: 768px) and (-webkit-device-pixel-ratio: 1),

/* Galaxy Tab 3 10" | Galaxy Tab 2 10" | Samsung Galaxy Tab (8.9") */
/*screen and (orientation: portrait) and (device-width: 800px) and (device-height: 1280px) and (-webkit-device-pixel-ratio: 1),
screen and (orientation: landscape) and (device-width: 1280px) and (device-height: 800px) and (-webkit-device-pixel-ratio: 1),*/

/* Galaxy Tab 2 (7") */
screen and (orientation: portrait) and (device-width: 600px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 1),
screen and (orientation: landscape) and (device-width: 1024px) and (device-height: 600px) and (-webkit-device-pixel-ratio: 1),

/* HTC Nexus 9 | Asus Nexus 7 (v2) | LG G Pad 8.3 */
screen and (orientation: portrait) and (min-device-width: 600px) and (max-device-width: 768px) and (min-device-height: 960px) and (max-device-height: 1024px) and (-webkit-device-pixel-ratio: 2),
screen and (orientation: landscape) and (min-device-width: 960px) and (max-device-width: 1024px) and (min-device-height: 600px) and (max-device-height: 768px) and (-webkit-device-pixel-ratio: 2),

/* Asus Nexus 7 (v1) */
screen and (orientation: portrait) and (device-width: 604px) and (device-height: 966px) and (-webkit-device-pixel-ratio: 1.325),
screen and (orientation: landscape) and (device-width: 966px) and (device-height: 604px) and (-webkit-device-pixel-ratio: 1.325) {
  body {
    width: auto;
  }

  /**************************************
   * top feedback
   **************************************/
  .modal-body.top-feedback {
    padding: 6px 40px 0px 5px;
    height: 34px;
  }
  .top-feedback img {
    margin-right: 0;
  }

  .feedback-message {
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    word-break: break-all;
    overflow: hidden;
    width: 100%;
  }
  .top-feedback .close-modal {
    top: -1px;
    right: 0;
    padding: 9px 13px;
  }

  /**************************************
    * left menu
   **************************************/
  #my-link-menu {
    display: none;
  }

  .nav-side-menu .menu-list li:hover a {
    padding-left: 0;
  }

  /**************************************
   *
   * menu bar
   *
   **************************************/
  .secondary-bar {
    position: fixed;
  }

  /**************************************
   * primary menu
   **************************************/
  #primary-bar-change-view,
  #global-notification,
  #toggle-video-window {
    display: none;
  }

  /* search item */
  .toolbar .search-input {
    height: 40px;
    top: -60px;
  }
  .toolbar .search-input.show {
    font-size: 16px;
  }
  .toolbar .search-input input {
    background: url(../img/secondary-bar-icon/search.svg) no-repeat 0px 0px;
    width: auto;
  }
  .toolbar .search-input i {
    top: 0;
    font-size: 24px;
    padding: 8px;
  }

  .current-page-menu {
    right: auto;
  }

  /* main toolbar */

  .current-page-menu .switch-mode {
    margin-right: 10px;
  }

  .current-page-menu .upload-file,
  .current-page-menu .add-collection,
  .current-page-menu .add-thumbdrive,
  .current-page-menu .switch-mode,
  .current-page-menu .show-view .dropdown-toggle,
  .current-page-menu .search-button {
    width: 35px;
    height: 35px;

    margin-right: 0;
    cursor: pointer;
    padding: 0px 27px 0 27px;
    margin-top: -3px;
  }
  .global-notification .dropdown-toggle {
    top: 2px;
    width: 32px;
    height: 32px;
  }

  .current-page-menu .upload-file {
    background: url("../img/secondary-bar-icon/add-file.svg") no-repeat 8px 0px;
  }
  .current-page-menu .add-collection {
    background: url("../img/secondary-bar-icon/new-folder.svg") no-repeat 10px 0px;
  }
  .current-page-menu .add-thumbdrive {
    background: url("../img/secondary-bar-icon/add-thumbdrive.svg") no-repeat 7px 0px;
  }
  .current-page-menu .switch-mode {
    background: url("../img/secondary-bar-icon/switch-mode.svg") no-repeat 10px 0px;
  }
  .current-page-menu .switch-mode.selected {
    background: url("../img/secondary-bar-icon/switch-mode-selected.svg") no-repeat 10px 0px;
  }
  .current-page-menu .search-button {
    margin-right: 0;
    background: url("../img/secondary-bar-icon/search.svg") no-repeat 10px 0px;
  }

  /*
   * hide hover button
   */
  .current-page-menu .upload-file:hover {
    background: url("../img/secondary-bar-icon/add-file.svg") no-repeat 8px 0px;
  }
  .current-page-menu .add-collection:hover {
    background: url("../img/secondary-bar-icon/new-folder.svg") no-repeat 10px 0px;
  }
  .current-page-menu .add-thumbdrive:hover {
    background: url("../img/secondary-bar-icon/add-thumbdrive.svg") no-repeat 7px 0px;
  }
  .current-page-menu .switch-mode:hover {
    background: url("../img/secondary-bar-icon/switch-mode.svg") no-repeat 10px 0px;
  }
  .current-page-menu .switch-mode.selected:hover {
    background: url("../img/secondary-bar-icon/switch-mode-selected.svg") no-repeat 10px 0px;
  }
  .current-page-menu .search-button:hover {
    background: url("../img/secondary-bar-icon/search-hover.svg") no-repeat 10px 0px;
  }

  /**************************************
   * breadcrumb
   **************************************/
  .toolbar.last-head-menu .breadcrumb {
    margin-top: 8px;
    display: none;
  }

  .breadcrumb-level .dropdown-menu.extended li button {
    padding: 7px 0 7px 7px;
  }

  .toolbar.last-head-menu .breadcrumb.mobile-breadcrumb {
    display: inline;
    height: 30px;

    font-size: 15px;
    color: #808080;
    font-family: 'Open Sans', 'sans-serif';

    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    word-break: break-all;
    overflow: hidden;
  }

  .toolbar.last-head-menu .breadcrumb.mobile-breadcrumb.first-level {
    font-size: 18px;
    text-transform: uppercase;
  }

  .toolbar.last-head-menu .breadcrumb.mobile-breadcrumb .back-btn {
    color: #0587B9;
    border: 0;
    background: transparent;
    padding: 2px 14px 2px 0;
    font-size: 19px;
  }
  
  /**************************************
   * item toolbar
   **************************************/
  .selected-item-toolbar {
    height: 36px;
    right: -15px;
    top: 59px;
  }
  .selected-item-toolbar .tool-group img {
    width: 30px;
    height: 30px;
  }
  .selected-item-toolbar .copy-to img,
  .selected-item-toolbar .manage-versions img {
    width: 22px;
    height: 22px;
  }
  .selected-item-toolbar .send-link img,
  .selected-item-toolbar .leave img {
    width: 25px;
    height: 25px;
  }
  .selected-item-toolbar .tool-group {
    top: 1px;
  }

  /**************************************
   * main content
   **************************************/

  /*
   * table
   */
  .table-view {
    margin-bottom: 60px;
  }

  .load-more-item-btn-group {
    text-align: center;
  }
  .load-more-btn,
  .load-more-btn:focus {
    background-color: #FFF;
    color: #4B9BCD;
    border: 1px solid #4B9BCD;
    padding: 4px 10px;
    border-radius: 0;
    margin-top: 11px;
  }

  /*
   * menu
   */
  .table.list-of-all-file td .mobile-menu-btn {
    display: inline;

    color: #3C3228;
    font-size: 20px;
    padding: 15px 16px;
    background: transparent;

    width: 100%;
    height: 59px;
  }
  .table.list-of-all-file td .mobile-menu-btn.hide {
    display: none;
  }

  .selected-item-toolbar {
    display: none;
  }

  .trash-page .table.small-view > thead > tr > th:last-child, 
  .trash-page .table.small-view > tbody > tr > td:last-child {
    display: table-cell;
  }

  /**************************************
   * progress bar
   **************************************/
  .group-of-storage-percent .input-group-addon,
  .used-space, 
  .available-space {
    font-size: 11px;
  }

  .available-space {
    right: 43px;
  }

  .progress-storage .group-of-storage-percent .input-group-addon {
    min-width: 42px;
    max-width: 42px;
  }

  /***************************************
   * slide menu from bottom 
   ***************************************/
  .mobile-slide-menu {
    display: inline;
  }

  .multiple-selected-mobile {
    position: fixed;
    z-index: 1020; /* operation modal z-index is 1040 */
    bottom: -1px;
    right: 0;
    left: 0;
    margin: 0 auto;

    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    text-align: center;
    padding: 0;

    height: 50px;
    width: 250px;
    border-left: 2px solid #4B9BCD;
    border-top: 2px solid #4B9BCD;
    border-right: 2px solid #4B9BCD;
    background-color: #FFF;
    border-radius: 10px 10px 0 0;

    /* rgb(75, 155, 205) is #4B9BCD */
    /*-moz-box-shadow: 0 0 15px rgba(75, 155, 205, 0.7);
    -webkit-box-shadow: 0 0 15px rgba(75, 155, 205, 0.7);
    box-shadow: 0 0 15px rgba(75, 155, 205, 0.7);*/
  }
  
  .mobile-menu-btn {
    padding: 12px 20px;
    background: transparent;
  }
  .mobile-menu-btn i {
    font-size: 22px;
  }

  .slide-menu-bottom-bg {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1030; /* uplaod widget is 1100 */
  }
  .slide-menu-bottom-bg.show {
    left: 0;
    right: 0;
    top: 0;
    bottom: -1px;
  }

  .slide-menu-bottom {
    position: absolute;
    z-index: 1030; 
    background-color: #FFF;
    bottom: -300px;
    left: 0;
    right: 0;
    top: auto;
    border-top: 1px solid #ccc;
    display: none;

    -webkit-transition: 0.3s;
    -moz-transition: 0.3s;
    -ms-transition: 0.3s;
    -o-transition: 0.3s;
    transition: 0.3s;
    -webkit-backface-visibility: hidden;
  }
  .slide-menu-bottom.show {
    bottom: 0;
  }

  .slide-menu-bottom ul {
    margin-bottom: 0;
  }
  .slide-menu-bottom .seleced-item li {
    border-bottom: 1px solid #E6E7E8;
    padding: 9px 7px 9px 10px;
    font-weight: bold;

    width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    word-break: break-all;
    overflow: hidden;
  }
  .slide-menu-bottom .seleced-item li img {
    width: 25px;
    height: 25px;
    margin-right: 17px;
  }

  .slide-menu-bottom button {
    padding: 12px 7px 12px 50px;
    width: 100%;
    text-align: left;
    border: 0;
  }

  .slide-menu-bottom .seleced-item li,
  .slide-menu-bottom button,
  .slide-menu-bottom .clear-selection li  {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    color: #3C3228;
  }

  .slide-menu-bottom .clear-selection {
    margin-bottom: 0;
  }
  .slide-menu-bottom .clear-selection li {
    padding: 12px 7px 12px 50px;
    text-align: left;
    border-top: 1px solid #E6E7E8;
  }

  .slide-menu-bottom .rename-btn {
    background: url("../img/operation-file-icon/file-rename.svg") no-repeat 6px 6px;
    background-size: 34px 34px;
  }

  .slide-menu-bottom .download-btn {
    background: url("../img/operation-file-icon/file-download.svg") no-repeat 6px 6px;
    background-size: 34px 34px;
  }

  .slide-menu-bottom .move-btn {
    background: url("../img/operation-file-icon/file-move.svg") no-repeat 6px 6px;
    background-size: 34px 34px;
  }

  .slide-menu-bottom .copy-to-btn {
    background: url("../img/operation-file-icon/copy-to.svg") no-repeat 8px 9px;
    background-size: 27px 27px;
  }

  .slide-menu-bottom .leave-btn {
    background: url("../img/operation-file-icon/leave.svg") no-repeat 11px 9px;
    background-size: 27px 27px;
  }

  .slide-menu-bottom .remove-btn {
    background: url("../img/operation-file-icon/file-remove.svg") no-repeat 6px 5px;
    background-size: 34px 34px;
  }

  .slide-menu-bottom .restore-btn {
    background: url("../img/operation-file-icon/restore-item.svg") no-repeat 10px 9px;
    background-size: 26px 26px;
  }

  .mobile-message {
    font-size: 13px;
    font-family: 'Montserrat', sans-serif;
    margin: 5px 10px 10px;
  }

  /**************************************
   * default style 
   **************************************/
  .btn,
  .btn-cancel, 
  .btn-create, 
  .btn-remove {
    font-size: 15px;
  }

  /*
   * item list
   */
  table.list-of-all-file td:nth-child(2), /* item type */
  table.list-of-all-file th:nth-child(2) {
    display: none;
  }

  .table.list-of-all-file td .export-thumb-btn,
  .table.list-of-all-file td .exporting-thumb-sign,
  .table.list-of-all-file td .share-link-sign,
  .table.list-of-all-file td .share-link-sign.expire,
  .table.list-of-all-file td .share-thumb-btn,
  .manage-versions-icon {
    display: none;
  }

  .table.small-view > thead > tr > th:last-child, 
  .table.list-of-all-file td.share-mgnt-btn {
    width: 50px;
  }

  .small-view tbody tr:hover {
    background-color: #FFF;
  }
  .small-view tbody tr.selected:hover {
    background-color: #DCF0FA;
  }

  .small-view .open-icon {
    width: 45px;
    height: 45px;
  }

  .small-view tbody tr:hover .open-text,
  .small-view tbody tr:focus .open-text {
    color: #4B4137;
  }

  .table.list-of-all-file td .open-text {
    font-size: 15px;
  }

  .rename-row .newname-input {
    height: 31px;
    font-size: 16px;
  }
  .cancel-create-button {
    font-size: 25px;
    padding: 18px;

    top: 0;
    right: 0;
  }
  .cancel-create-button:hover {
    color: #808080;
  }

   /*
   * batch input
   */
  .batch-tool input,
  input.check-item {
    width: 25px;
    height: 25px;
    margin: 0;
  }

  .batch-tool input {
    position: relative;
    top: -4px;
  }
  .batch-tool span {
    display: none;
  }

  input.check-item {
    position: relative;
    top: 9px;
    margin-right: 4px;
  }

  /**************************************
   * profile page
   **************************************/
  .profile-area {
    padding: 0 15px;
  }

  .profile-pic,
  .account-detail,
  .storage-chart {
    display: none;
  }

  .profile-detail li span.edit {
    font-size: 14px;
    margin-top: 5px;
  }
  .edit-profile-input {
    font-size: 16px;
  }

  .edit-profile-tool {
    font-size: 22px;
    padding: 12px 12px 4px 12px;
    position: absolute;
    right: 0;
    top: -15px;
  }

  /**************************************
   * modal
   **************************************/

  /*
   * default modal
   */
  /*.modal-body {
    top: 170px;
  }*/

  .modal-body,
  .modal-body.move-modal {
    /*top: 270px;*/
  }

  .modal.loading-sign .modal-body {
    /*top: 50%;*/
  }

  /* can click bg to close modal */
  /*.modal.fade.mobile-view .modal-dialog, 
  .modal.in .modal-dialog {
    position: relative;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }*/

  /*
   * permanently remove moda
   */
  .permanently-remove-modal .modal-title {
    font-size: 18px;
  }
  .permanently-remove-modal h3.modal-title span {
    top: 30px;
  }

  /*
   * move modal, copy modal, remove modal 
   */

  .modal,
  .file-detail.remove, 
  .question-text,
  .file-detail .file-name span, 
  .file-detail .file-size, 
  .share-drive span {
    font-size: 16px;
  }

  .modal-error-message {
    padding-left: 0;
  }

  .selected-item-detail img,
  .selected-item-detail img.folder-icon {
    width: 25px;
    height: 25px;
  }

  .no-selected-item-msg {
    padding-right: 0;
  }

  ul.abn-tree i.indented {
    font-size: 25px;
    vertical-align: middle;
    padding: 8px 15px 10px 10px;
  }

  .move-tree a button {
    vertical-align: middle;
  }

  .move-tree a button.thumb-icon {
    height: 30px;
  }
  .move-tree a button.folder-icon {
    height: 25px;
  }

  /* hover folder/drive in tree*/
  .nav>li>a:hover {
    background-color: #FFF;
  }

  .file-detail .file-name img {
    width: 25px;
    height: 25px;
  }

  .file-size {
    top: 0;
  }

  /*
   * alert modal
   */
  .modal-body.alert-modal {
    font-size: 16px;
  }
  .alert-quota-header {
    padding: 12px 15px;
  }

  /**************************************
   * widget
   **************************************/
  .upload-widget {
    position: fixed;
    left: 5px;
    right: 5px;
    bottom: -1px;
    z-index: 1000;

    width: auto;
    max-width: 600px;
  }

  .large-upload-widget .top-widget .top-widget-btn {
    padding: 10px;
    margin: 0;
  }

  .upload-widget .right-side {
    padding: 0;
  }

  /* hide uploading file size show uploading percent only */
  .progress-detail .desc {
    display: none;
  }

  /* cancel upload file */
  .uploading-list .cancel-upload-form span {
    padding-bottom: 5px;
    font-size: 13px;
  }
  .uploading-list .cancel-upload-form button {
    padding: 4px 0;
    font-size: 12px;
  }

  /*
   * minimize widget
   */
  .upload-widget.small {
    width: auto;
    max-width: 520px;
    height: 50px;
    padding-top: 3px;
  }

  .small-upload-widget .top-widget {
    padding-bottom: 19px;
  }

  .small-upload-widget .top-widget .left-side {
    width: 100%;
  } 
  .small-upload-widget .top-widget .top-widget-progress {
    margin-top: 0;
    margin-left: 50px;
    width: 100%;
  }
  .upload-widget .small-upload-widget .top-widget-progress .left-side {
    width: 70%;
  }

  .small-upload-widget .upload-widget-status {
    left: 0;
  }

  .small-upload-widget .top-widget .top-widget-btn {
    position: absolute;
    right: 10px;
    padding: 10px;
    top: -13px;
  }
  .top-widget .top-widget-btn i {
    font-size: 20px;
  }
}

@media screen and (orientation: portrait) and (min-device-width: 320px) and (max-device-width: 375px) and (-webkit-min-device-pixel-ratio: 1.5) {
  .la-ball-spin.loading-sign {
    left: 38%;
    top: 40%;
  }
}

@media screen and (orientation: landscape) and (min-device-height: 480px) and (max-device-height: 667px) and (-webkit-min-device-pixel-ratio: 1.5) {
  .la-ball-spin.loading-sign {
    left: 43%;
    top: 35%;
  }
}

/**************************************
 *
 * small mobile portrait
 *
 **************************************/
@media screen and (orientation: portrait) and (min-device-width: 320px) and (max-device-width: 414px) and (-webkit-min-device-pixel-ratio: 1.5) {
  /**************************************
   * main toolbar, breadcrumb and file list
   **************************************/
  .current-page-menu {
    position: relative;
    top: -33px;
  }

  .toolbar.last-head-menu .breadcrumb {
    width: 100%;
    position: relative;
    top: 45px;
    margin: 0;
  }

  .secondary-bar .fixed-main-header-table {
    background: #fff;
    top: 85px
  }

  #main-content {
    min-height: 568px;
    top: 85px;
  }

  .toolbar.last-head-menu .breadcrumb.mobile-breadcrumb {
    padding-right: 10px;
  }

  .batch-tool {
    top: auto;
  }

  /**************************************
   * widget
   **************************************/
  .uploading-list .uploading-name span {
    width: 75px;
  }

  /* cancel upload all file*/
  .small-upload-widget .top-widget.hide-border-bottom {
    border-bottom: 0;
  }

  .cancel-all-upload-form {
    position: relative;
    top: -29px;
  }

  .upload-widget .small-upload-widget .remaining-time.hide {
    display: none;
  }

  .small-upload-widget .top-widget .top-widget-progress.custom-width {
    width: 250px;
  }
  .small-upload-widget .cancel-upload-form {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
  }

  .upload-widget .small-upload-widget .top-widget-progress .cancel-upload-form .left-side {
    width: auto;
  }

  .upload-widget .small-upload-widget .top-widget-progress .cancel-upload-form .right-side {
    padding-right: 0;
    position: absolute;
    right: 0;
    top: 17px;
  }

  .upload-widget .small-upload-widget .cancel-upload-form .btn {
    padding: 4px 0;
  }
}

/*
 * item name on iPod
 */
@media screen and (orientation: portrait) and (min-device-width: 320px) and (max-device-width: 413px) and (-webkit-min-device-pixel-ratio: 1.5) {
  /**************************************
   * main content
   **************************************/
  .small-view .open-text {
    max-width: 85px;
  }
}