/**
 * TODO Header
 */
.ytpl-header {
    left: 0;
    right: 160px;
}

body.folded .ytpl-header {
    left: 0;
    right: 36px;
}

.ytpl-header .ytpl-logo img {
    margin: 0 0 0 4px;
}

.ytpl-header .ytpl-create-button .ytpl-icon {
    margin: 0 0 0 10px;
}

/**
 * TODO Sidebar
 */
.ytpl-left-nav {
    left: 0;
    right: 160px;
    border-right: none;
    border-left: 1px solid #E0E0E0;
}

body.folded .ytpl-left-nav {
    left: 0;
    right: 36px;
}

.ytpl-nav-item .ytpl-icon {
    float: right;
}

.ytpl-nav-item.active:before {
    left: auto;
    right: 0;
}

/**
 * TODO Content
 */
.ytpl-page-content {
    left: 0;
    right: calc(160px + 256px);
}

body.folded .ytpl-page-content {
    left: 0;
    right: calc(36px + 256px);
}

.ytpl-accordion .ytpl-tabs .ytpl-save {
    right: auto;
    left: 32px;
}

/** Video edit */
.ytpl-video-detail-content .ytpl-options {
    padding: 14px 16px 0 0;
}

.ytpl-edit-video-panel > div:last-child {
    padding: 0 24px 0 0;
}

.ytpl_show_edit_subtitle .ytpl-icon {
    float: right;
}

/** Comment */
.ytpl-comment-row .ytpl-reply-section button {
    float: left;
}

.ytpl-comment-row .ytpl-field-text-area {
    margin: 8px 0 0 14px;
}

.ytpl-comment-row:not(.reply) .ytpl-table-cell:last-child {
    padding-right: 12px !important;
    padding-left: 24px !important;
}

/** Table selector */
.ytpl-table-selector {
    text-align: right;
}

.ytpl-table-selector > div {
    margin: 7px 0 0 22px;
    padding: 0 0 0 22px;
}

.ytpl-table-selector .ytpl-title {
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

/** Accordion */
.ytpl-accordion .ytpl-tab-button {
    float: right;
    margin: 0 0 0 42px;
}

/** Playlist */
#ytpl_open_popup_playlist {
    margin: 0 8px 0 0;
}

.ytpl-playlist-create:before {
    left: auto;
    right: 48px;
}

.ytpl-playlist-create label {
    text-align: right;
}

.ytpl-playlist-create input {
    margin: 12px 14px 0 0;
}

.ytpl-playlist-create > div {
    text-align: right;
}

.ytpl-playlist-create > div a {
    float: left;
    margin: 0 8px 0 0;
}

/** Pagination */
.ytpl-table-pagination {
    padding: 0 0 0 24px;
}

.ytpl-table-pagination .ytpl-icon-button {
    float: left;
    transform: rotate(180deg);
}

.ytpl-table-pagination > * {
    float: left;
}

/**
 * TODO Popup
 */
.ytpl-popup {
    left: 0;
    right: 160px;
}

body.folded .ytpl-popup {
    left: 0;
    right: 36px;
}

.ytpl-popup-title {
    float: right;
    margin: 8px 8px 0 0;
}

.ytpl-popup-right-section {
    float: left;
}

.ytpl-popup-right-section .ytpl-icon-button {
    margin: 5px 21px 0 4px;
}

.ytpl-popup-box > div:nth-child(3) .ytpl-button {
    float: left;
    margin: 7px 24px 0 6px;
}

.ytpl-popup .ytpl-field-checkbox .ytpl-checkbox {
    margin: 3px 3px 3px 12px;
}

/** Create */
.ytpl-step-line-content > div:first-child {
    text-align: right;
}

.ytpl-step-line-content > div:first-child span {
    transform: translateX(50%);
}

.ytpl-step-line-content > div:last-child {
    text-align: left;
}

.ytpl-step-line-content > div:last-child span {
    transform: translateX(-50%);
}

.ytpl-create-video-visibility > div:first-child,
.ytpl-create-content-section > div:first-child {
    padding: 28px 28px 0 0;
}

/**
 * TODO Fields
 */
/** Thumbnail */
.ytpl-field-thumbnail .ytpl-select {
    float: right;
    margin: 0 0 0 10px;
}

.ytpl-field-thumbnail .ytpl-media {
    float: right;
}

/** Quality */
.ytpl-field-quality .ytpl-item button {
    margin: 0 0 0 14px;
}

/** Tag */
.ytpl-field-tags .ytpl-item {
    float: right;
    margin: 9px 9px 0 0;
}

/** Editor */
.ytpl-field.ytpl-field-editor {
    direction: ltr !important;
}

.ytpl-field-editor .ytpl-time-line .ytpl-row .ytpl-detail {
    direction: rtl;
}

.ytpl-field-editor .ytpl-time-line .ytpl-row .ytpl-detail .ytpl-icon {
    margin: 0 0 0 10px;
}

.ytpl-field-editor .ytpl-video-controller .ytpl-options .ytpl-option {
    direction: rtl;
}

.ytpl-field-editor .ytpl-video-controller .ytpl-options .ytpl-heading .ytpl-icon {
    right: auto;
    left: 0;
}

.ytpl-field-editor .ytpl-video-controller .ytpl-options .ytpl-content label button {
    margin: 0 10px 0 0;
}

/**
 * TODO Notification
 */
.ytpl-notification {
    left: 0;
}

.ytpl-notification .ytpl-item button {
    margin: 0 6px 0 0;
}

/**
 * TODO Pro Version
 */
.ytpl-free-version .ytpl-slider .ytpl-content {
    left: 28px;
}

.ytpl-free-version .ytpl-slider .ytpl-content .ytpl-meta {
    text-align: right;
}

/**
 * TODO @Media
 */
@media screen and (max-width: 960px) {

    body.auto-fold .ytpl-header {
        left: 0;
        right: 36px;
    }

    body.auto-fold .ytpl-left-nav {
        left: 0;
        right: 36px;
    }

    body.auto-fold .ytpl-page-content {
        left: 0;
        right: calc(36px + 256px);
    }

    body.auto-fold .ytpl-popup {
        left: 0;
        right: 36px;
    }

}

@media screen and (max-width: 782px) {

    body.auto-fold .ytpl-header {
        left: 0;
        right: 0;
    }

    body.auto-fold .ytpl-left-nav {
        left: 0;
        right: 0;
    }

    body.auto-fold .ytpl-page-content {
        left: 0;
        right: 256px;
    }

    body.auto-fold .ytpl-popup {
        left: 0;
        right: 0;
    }

}