/**
 * RUBY PLUGINS STYLE
 * @author          HaiBach
 * @version         1.0
 */

/**
 * LIST OF PLUGINS :
 *  + @plugin Menu
 *  + @plugin Backtop
 */







/**
 * RUBY MENU MAIN STYLE
 * @package         RubyMenu
 * @author          HaiBach
 * @link            http://haibach.net
 * @version         1.0
 */

/** MENU GENERAL STYLES **/
.rm01 {
    display: none;
}
.rm01.rm01ready {
    display: block;
}

.rm01menu {
    padding-left: 0;
    margin-top: 0; margin-bottom: 0;
}
.rm01menu .rm01menu {
    font-size: 1em;
}
.rm01list {
    display: block;
    margin-bottom: 0;
    min-width: 38px; min-height: 1px;
}
.rm01list > a {
    display: block;
    margin-bottom: 0;
    text-shadow: none;
    white-space: nowrap;
    cursor: pointer;

    outline: none; /* Loai bo highlight */
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}
/* -------------------------------------------------------------------------- */






/**
 * MENU HORIZONTAL
 */
.rm01hor {
    display: block;
    position: relative;
}
.rm01hor .rm01menu {
    font-size: 12px;
}
.rm01hor .rm01list {
    position: relative;
}
.rm01hor .rm01list > a {
    padding: 10px 20px;                          /* Height 40 px */
}


/***** MENU LEVEL 1 *****/
.rm01hor .rm01menu-lv1, .rm01hor .rm01list-lv1 {
    float: left;
}
.rm01hor .rm01list-lv1 > a {
    float: left;
    margin-right: 1px;
}


/***** MENU LEVEL 2 - 3 *****/
.rm01hor .rm01menu .rm01menu {
    position: absolute;
    width: 200px;
    margin-left: 0; margin-top: 0;
}
.rm01hor .rm01list.rm01open > .rm01menu {
    visibility: visible;
    display: block;
}
.rm01hor .rm01menu-lv2 {
    left: 0; top: 100%;
    z-index: 9;
}
.rm01hor .rm01menu-lv3 {
    left: 100%; top: 0;
}

.rm01hor .rm01menu .rm01menu .rm01list > a {
    padding-left: 20px; padding-right: 20px;
    white-space: normal;
}


/***** MENU RIGHT *****/
.rm01hor .rm01menu.rm01right {
    left: auto; right: 1px;
}


/***** MENU CARET *****/
.rm01hor .rm01list-lv1 > a > .rm01caret:after {
    content: "+";
    padding-left: 10px;
}
.rm01hor .rm01menu .rm01menu .rm01caret:after {
    content: "\0203A";
    display: block;
    position: absolute;
    right: 15px; top: 10px;
}


/***** LINK BACK *****/
.rm01hor .rm01listback {
    display: none;
}


/***** EFFECT CHO MENU HANGER ******/
.rm01hanger .rm01list > .rm01menu {
    display: none;
}
.rm01hanger .rm01list.rm01open > .rm01menu {
    display: block;
}

.rm01hanger .rm01fx-open {
    -webkit-animation: rm01softTopIn .15s ease;
            animation: rm01softTopIn .15s ease;
}
@keyframes rm01softTopIn {
    0%   { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
@-webkit-keyframes rm01softTopIn {
    0%   { opacity: 0; -webkit-transform: translateY(20px); }
    100% { opacity: 1; -webkit-transform: translateY(0); }
}
/* -------------------------------------------------------------------------- */










/**
 * MENU DRAWER CORE
 */
.rm01drawer .rm01menu {
    position: relative;
    left: 0; top: 0;
}
.rm01drawer .rm01menu .rm01menu {
    display: none;
    margin: 0;
}


/***** MENU DRAWER CARET *****/
.rm01drawer .rm01list > a {
    position: relative;
}
.rm01drawer .rm01caret {
    position: absolute;
    display: block;
    width: 6px; height: 1px;
    right: 15px; top: 23px;
    background-color: #666;
}
.rm01drawer .rm01menu a.rm01actived > .rm01caret {
    background-color: #333;
}


/***** MENU DRAWER OPEN ACTIVED *****/
.rm01drawer .rm01menu.rm01open > * {
    display: none;
}
.rm01drawer .rm01menu.rm01open > .rm01list.rm01open {
    display: block;
}
.rm01drawer .rm01list.rm01open > a {
    display: none;
}
.rm01drawer .rm01list.rm01open > .rm01menu {
    display: block;
}


/***** EFFECTS *****/
.rm01ghost {
    position: absolute !important;
    top: 0; left: 0;
    width: 100%;
}
.rm01drawer .rm01fx-open {
    -webkit-animation: rm01leftOut .15s ease;
            animation: rm01leftOut .15s ease;
}
.rm01drawer .rm01fx-open.rm01ghost {
    -webkit-animation: rm01rightIn .15s ease;
            animation: rm01rightIn .15s ease;
}
.rm01drawer .rm01fx-closed {
    -webkit-animation: rm01rightOut .15s ease;
            animation: rm01rightOut .15s ease;
}
.rm01drawer .rm01fx-closed.rm01ghost {
    -webkit-animation: rm01leftIn .15s ease;
    animation: rm01leftIn .15s ease;
}

@keyframes rm01leftIn {
    0%   { opacity: 0; transform: translateX(-100%); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes rm01leftOut {
    0%   { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(-100%); }
}
@keyframes rm01rightIn {
    0%   { opacity: 0; transform: translateX(100%); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes rm01rightOut {
    0%   { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(100%); }
}
@-webkit-keyframes rm01leftIn {
    0%   { opacity: 0; -webkit-transform: translateX(-100%); }
    100% { opacity: 1; -webkit-transform: translateX(0); }
}
@-webkit-keyframes rm01leftOut {
    0%   { opacity: 1; -webkit-transform: translateX(0); }
    100% { opacity: 0; -webkit-transform: translateX(-100%); }
}
@-webkit-keyframes rm01rightIn {
    0%   { opacity: 0; -webkit-transform: translateX(100%); }
    100% { opacity: 1; -webkit-transform: translateX(0); }
}
@-webkit-keyframes rm01rightOut {
    0%   { opacity: 1; -webkit-transform: translateX(0); }
    100% { opacity: 0; -webkit-transform: translateX(100%); }
}
/* -------------------------------------------------------------------------- */









/**
 * MENU VERTICAL
 */
.rm01ver {
    position: relative;
    margin-bottom: 30px;
    border-right: 1px solid #e5e5e5;
}
.rm01ver .rm01list > a {
    padding-top: 15px; padding-bottom: 15px;
    color: #999;
}

.rm01ver .rm01list:hover > a {
    color: #333;
}


/***** MENU LINKBACK *****/
.rm01ver .rm01linkback {
    border-bottom: 1px solid #e5e5e5
}
/* -------------------------------------------------------------------------- */









/**
 * MENU OFF-CANVAS - MENU DRAWER
 */
.rm01offcanvas {
    position: fixed;
    overflow-x: hidden; overflow-y: auto;
    -webkit-overflow-scrolling: touch;      /* For iOS5+ */
    z-index: 10;

    width: 260px !important; height: 100%;
    right: 0; top: 0;
    visibility: hidden;
        background-color: #03A9F4;

    -webkit-transition: -webkit-transform .15s;
            transition:         transform .15s;

    -webkit-transform-origin: right top;
            transform-origin: right top;
    -webkit-transform: translateX(260px);
            transform: translateX(260px);
}
.rm01offcanvas .rm01menu {
    width: 100%;
    background-color: #333;
}

.rm01offcanvas .rm01list > a {
    padding: 15px 20px;
    color: #999;
}
.rm01offcanvas .rm01list:hover > a {
    color: #fff;
}


/***** LINK BACK *****/
.rm01arrowback {
    padding-right: 10px;
    font-size: 1.4em;
}
.rm01offcanvas .rm01listback {
    background-color: #222;
}


/***** BUTTON TOGGLE OFF-CANVAS *****/
.rm01btn-toggle {
    position: fixed;
    right: 0; top: 15px;
    display: none;
    width: 48px;
    padding-top: 10px; padding-bottom: 10px;
    z-index: 10;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);

    -webkit-transition: -webkit-transform .15s;
            transition:         transform .15s;
    -webkit-transform-origin: right top;
            transform-origin: right top;
}
.rm01btn-toggle.rm01show {
    display: block;
}

.rm01btn-toggle span {
    display: block;
    position: relative;
    width: 18px; height: 3px;
    margin-left: -33px; margin-bottom: 3px;
    right: -100%;
    background-color: rgba(0,0,0,0.4);
    box-shadow: 0 1px 0 rgba(255,255,255,0.2);
}
.rm01btn-toggle:hover span,
.rm01btn-toggle.rm01push span {
    background-color: rgba(0,0,0,0.8);
}






/**
 * MENU OFF-CANVAS ACTIVED PUSH
 */
html.rm01push {
    overflow-x: hidden;
}
.rm01push body {
    position: relative;
    right: 260px;
}
.rm01offcanvas.rm01push {
    visibility: visible;
    -webkit-transform: translateX(0);
            transform: translateX(0);
}


/***** BUTTON TOGGLE OFF-CANVAS *****/
.rm01btn-toggle.rm01push {
    height: 100%; width: 100%;

    -webkit-transform: translateX(-260px);
            transform: translateX(-260px);
}
.rm01btn-toggle.rm01push:after {
    border-left-color: #333;
}
/* -------------------------------------------------------------------------- */









/**
 * STYLE CUSTOM FOR RUBY MENU
 */
/***** MENU HORIZONTAL *****/
.rm01hor {
    float: right;
}
.rm01hor .rm01list-lv1 > a {
    border: 1px solid transparent;
    border-radius: 3px;
    color: #25d366;
}
.rm01hor .rm01list-lv1:hover > a,
.rm01hor .rm01list-lv1.rm01list.rm01open > a {
    background-color: #fff;
    border-color: #cc0055;
    color: #666;
}
.rm01hor .rm01list-parent-lv1.rm01list.rm01open > a {
    border-radius: 3px 3px 0 0;
}

.rm01hor .rm01menu .rm01menu {
    background-color: #fff;
    border: 1px solid #cc0055;
    border-radius: 3px;
}
.rm01hor .rm01menu .rm01menu .rm01menu {
    margin-left: 4px;
}
.rm01hor .rm01list-parent-lv1 > .rm01menu {
    border-radius: 0 3px 3px 3px;
}
.rm01hor .rm01menu .rm01menu .rm01list > a {
    color: #999;
}
.rm01hor .rm01menu .rm01menu .rm01list:hover > a,
.rm01hor .rm01menu .rm01menu .rm01list.rm01open > a {
    background-color: #f5f5f5;
    color: #333;
}
















/**
 * RUBY BACKTOP MAIN STYLE
 * @package         RubyBackTop
 * @author          HaiBach
 * @link            http://haibach.net
 * @version         1.0
 */
.rubybacktop {
    position: fixed;
    right: -100px; bottom: 50px;
    display: block;
    width: 38px; height: 38px;
    margin-right: 15px;
    bottom: 200px;
    background-color: #ccc;
    border-radius: 3px;
    color: #fff;
    opacity: .3;
    line-height: 38px;
    text-indent: -9999px;
    cursor: pointer;
    z-index: 999999;

    -webkit-transition: right .2s;
            transition: right .2s;
}
.rubybacktop:hover, .rubybacktop:focus {
    background-color: #cc0055;
    opacity: 1;
}
.rubybacktop.rubybacktop-actived {
    right: 0;
}

/***** BACKTOP ARROW *****/
.rubybacktop > .rubybacktop-first {
    position: absolute;
    display: block;
    width: 0; height: 0;
    top: 50%; left: 50%;
    margin-left: -8px; margin-top: -8px;

    border: 8px solid transparent;
    border-bottom-color: #000;
    border-top: none;
}
.rubybacktop > .rubybacktop-last {
    position: absolute;
    display: block;
    width: 6px; height: 6px;
    top: 50%; left: 50%;
    margin-left: -3px; margin-top: -1px;
    background-color: #000;
}
.rubybacktop:hover > .rubybacktop-first,
.rubybacktop:focus > .rubybacktop-first {
    border-bottom-color: #fff;
}
.rubybacktop:hover > .rubybacktop-last,
.rubybacktop:focus > .rubybacktop-last {
    background-color: #fff;
}


/***** BACKTOP MEDIA *****/
@media only screen and (max-width: 767px) {
    .rubybacktop { display: none; }
}




















/**
 * RUBY TOGGLE MAIN STYLE
 * @package         RubyToggle
 * @author          HaiBach
 * @link            http://haibach.net
 * @version         1.0
 */
.rubytoggle-none {
    display: none;
}
.rubytoggle-preactived {
    visibility: hidden;
    position: absolute;
    width: 100%;
}
