/* ===== Modal 基础 ===== */

.modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: none;
    overflow: hidden;
    outline: 0;
    -webkit-overflow-scrolling: touch;
}

.modal.fade .modal-dialog {
    transform: translate(0, -25%);
    transition: transform 0.3s ease-out;
}

.modal.in .modal-dialog {
    transform: translate(0, 0);
}

.modal-open {
    overflow: hidden;
}

/* ===== 弹窗容器 ===== */

.modal-dialog {
    position: relative;
    width: auto;
    margin: 30px auto;
    max-width: 600px;
}

/* ===== 弹窗内容 ===== */

.modal-content {
    position: relative;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,.5);
    background-clip: padding-box;
    outline: 0;
}

/* ===== Header ===== */

.modal-header {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
    min-height: 16.43px;
}

.modal-title {
    margin: 0;
    line-height: 1.42857143;
    font-size: 18px;
    color: #333;
}

/* ===== Body ===== */

.modal-body {
    position: relative;
    padding: 15px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* ===== Footer ===== */

.modal-footer {
    padding: 15px;
    text-align: right;
    border-top: 1px solid #e5e5e5;
}

.modal-footer .btn + .btn {
    margin-left: 5px;
}

/* ===== Close 按钮 ===== */

.close {
    float: right;
    font-size: 21px;
    font-weight: bold;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: .2;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.close:hover {
    opacity: .5;
}

/* ===== 按钮 ===== */

.btn {
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    user-select: none;
}

.btn-default {
    color: #333;
    background-color: #fff;
    border-color: #ccc;
}

.btn-default:hover {
    background-color: #e6e6e6;
    border-color: #adadad;
}

/* ===== 遮罩层 ===== */

.modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    background-color: #000;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.in {
    opacity: .5;
}

/* ===== 辅助 ===== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ===== 移动端适配 ===== */

@media (max-width: 768px) {
    .modal-dialog {
        width: auto;
        margin: 10px;
    }
}