/* This File For Custom Style From Bootstrap */

/* Core Replace */
.btn {
    transition: 0.2s !important;
}

.btn-primary {
    color: #fff;
    background-color: #337ab7;
    border-color: #2e6da4;
    transition: 0.3s;
}

.btn-primary:disabled {
    background-color: #337ab7 !important;
    border-color: #2e6da4 !important;
}

.btn-primary:hover,
.btn-primary:active {
    background-color: #204d74 !important;
}


.btn-warning {
    color: #000 !important;
    background-color: #f0ad4e !important;
    border-color: #eea236 !important;
    transition: 0.3s;
}

.btn-warning:hover,
.btn-warning:active {
    background-color: #ec971f !important;
    border-color: #d58512 !important;
}

.col-md-4 label.error {
    position: relative;
    top: -15px;
    display: flex;
    margin-top: 16px;
    margin-bottom: -19px;
}

.col-md-6 label.error {
    position: relative;
    top: -15px;
    display: flex;
    margin-top: 1px;
}

.container {
    min-width: 100%;
    padding: 0
}

.img-circle.profile_img {
    width: 70%;
    background: #fff;
    margin-left: 15%;
    z-index: 1000;
    position: inherit;
    margin-top: 20px;
    border: 1px solid rgba(52, 73, 94, 0.44);
    padding: 4px;
    border-radius: 50%;
}

.top_nav .navbar-right {
    margin: 0;
    float: right;
    display: inline-block;
}

.nav.side-menu>li {
    position: relative;
    display: block;
    cursor: pointer;
    width: 100% !important;
}

.nav.side-menu {
    position: relative;
    display: block;
    cursor: pointer;
    width: 100% !important;
}

.nav-md ul.nav.child_menu li:after {
    border-left: 1px solid #425668;
    bottom: 0;
    content: "";
    left: 27px;
    position: absolute;
    top: 0;
    margin-top: 46px;
}

.form-control {
    font-size: 0.8rem !important;
}

.tile_count .tile_stats_count:before {
    height: 60px !important;
    margin-top: 0px !important;
}

.toggle {
    padding-top: 0px !important;
}

.panel_toolbox {
    min-width: 0px !important;
}

.control-label {
    font-weight: bold;
}

.form-check-label {
    cursor: pointer;
}

.btn-info {
    color: #fff !important;
    background-color: #31b0d5 !important;
    border-color: #269abc !important;
    transition: 0.3s;
}

.btn-info:hover,
.btn-info:active {
    color: #fff !important;
    background-color: #269abc !important;
}

.col-md-6>label.error {
    position: relative;
    top: 0px !important;
    display: flex;
}

.form-control.has-feedback-left {
    background: url(../assets/images/calendar-icon-2.png) no-repeat scroll 7px 7px;
    padding-left: 35px;
}

.form-select {
    font-size: small;
    box-shadow: none !important;
    border-radius: 0% !important;
}

.form-select:active,
.form-select:focus {
    font-size: small;
    box-shadow: none !important;
    border-color: #DEE2E6 !important;
}

.nav-pills>li.active>a,
.nav-pills>li.active>a:focus,
.nav-pills>li.active>a:hover {
    color: #fff;
    background-color: #337ab7;
}

.label {
    display: inline;
    padding: 0.2em 0.6em 0.3em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25em;
}

.label-warning {
    background-color: #f0ad4e;
    padding-right: 5px;
    padding-left: 5px;
    border-radius: 3px;
    color: #fff;
}

.label-success {
    background-color: #5cb85c !important;
    padding-right: 5px;
    padding-left: 5px;
    border-radius: 3px;
    color: #fff;
}

.label-danger {
    background-color: #d9534f !important;
    padding-right: 5px;
    padding-left: 5px;
    border-radius: 3px;
    color: #fff;
}

.label-primary {
    background-color: #337ab7 !important;
    padding-right: 5px;
    padding-left: 5px;
    border-radius: 3px;
    color: #fff;
}

input[type="file"] {
    display: block;
    padding-left: 15px;
    margin-bottom: 5px;
}

.flyctn {
    background: #fff;
    height: auto;
}

.flybody {
    padding: 10px;
    background: #fff;
}

.bootstrap-datetimepicker-widget table th {
    color: #000;
    background-color: #fff;
}

.separator {
    border-top: 0px solid #D8D8D8;
    margin-top: 0px;
    padding-top: 0px;
}

input.error,
textarea.error,
select.error {
    border: 1px solid red;
}

.x_content {
    padding: 0px !important;
}

/* WA Advanced Styles */
.detail-container {
    display: flex;
    gap: 1px;
}

.info-section {
    flex: 0 0 40%;
    min-width: 0;
    padding: 20px 15px;
}

.preview-section {
    flex: 0 0 25%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #646060;
}

/* Phone Frame */
.phone-frame {
    width: 320px;
    height: 640px;
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border-radius: 40px;
    padding: 10px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    margin: 25px auto 0;
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 26px;
    background: #000;
    border-radius: 0 0 14px 14px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #ECE5DD;
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wa-header-bar {
    background: #128C7E;
    color: white;
    padding: 35px 12px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.wa-header-bar .avatar {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-chat-area {
    flex: 1;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABmJLR0QA/wD/AP+gvaeTAAABhklEQVR4nO3dMU7DQBBA0R3h+x+ZLiIFoqCgQGKxvfP+q9O4+DRrZ+04AAAAAAAAAAAAAAAAAAC+5LT2BVziPB/3fj0/8x6v1qc1GhFynh+r3LV0a0bI+fK4hrMk9nbj7bVr99bKiJBzd7J2Z+3DZW29hpz/7X87a4f+G2tXhNxcO7b/iJBu59x+sna4v7Z6D9nqT9dGhCy7c+4+XLvZ37W1K0LuLR37f0RIt3Nu/7Z2874m20Fa/enaiBCH2LH/R4R0O+f2k7VhfyvU7o+ujQhxiB37f0RIt3Nu/7Y2ZC9v8adrI0K6HWL7R9aG/a3QyhOxp2sjQpbdOXcfrg37W6GVJ2JP10aEnLtz7j5cG/a3Qnv8pWsjQpbdOXcfrg37W6H/8bfI+IgQh9ix/0eEdDvn9m9rw/5WaI9P1kaEdDvE9o+sDftboT2+N+g9IsTh9S5+f/z5s/kRId0Osf0ja8P+VmiPT9ZGhHQ7xPaPrA37W6E9PlkbEdLtENs/sjbsbwUA4G/4BSWjFxLTR6HOAAAAAElFTkSuQmCC');
    background-repeat: repeat;
    background-size: 100px;
    padding: 15px 10px;
    overflow-y: auto;
}

.wa-message {
    background: white;
    border-radius: 8px;
    padding: 8px 10px;
    min-width: 200px;
    max-width: 95%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-left: 8px;
}

.wa-message::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    border-width: 6px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

.wa-message-header {
    font-weight: 700;
    font-size: 14px;
    color: #303030;
    margin-bottom: 4px;
}

.wa-message-body {
    color: #303030;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.wa-message-footer {
    color: #667781;
    font-size: 10px;
    border-top: 1px solid #e9ecef;
    padding-top: 4px;
    margin-top: 4px;
}

.wa-button {
    display: block;
    text-align: center;
    padding: 6px;
    color: #128C7E;
    font-weight: 500;
    font-size: 12px;
    border-top: 1px solid #e9ecef;
    text-decoration: none;
    margin: 4px -10px -8px;
}

.wa-button:hover {
    background: rgba(18, 140, 126, 0.1);
    color: #128C7E;
}

.wa-button i {
    margin-right: 4px;
}

.wa-time {
    font-size: 9px;
    color: #667781;
    text-align: right;
    margin-top: 2px;
}

.param-highlight {
    background: rgba(37, 211, 102, 0.2);
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 500;
}

.param-placeholder {
    background: rgba(255, 193, 7, 0.3);
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 500;
    color: #856404;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #6c757d;
}

.info-value {
    font-weight: 600;
    text-align: right;
}

.media-header {
    background: #f8f9fa;
    padding: 12px;
    text-align: center;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 10px;
    color: #6c757d;
}

.media-header i {
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
    color: #128C7E;
}

@media (max-width: 768px) {
    .detail-container {
        flex-direction: column-reverse;
    }

    .preview-section {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }

    .phone-frame {
        width: 220px;
        height: 440px;
    }
}

/* WA Advanced Page - Utility Classes */
.list-scroll-container {
    height: 200px;
    overflow: auto;
    width: 100%;
    border: 1px solid #c4c4c4;
    padding: 5px;
    padding-left: 10px;
}

.list-scroll-container ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.mb-0-hr {
    margin-bottom: 0;
}

.title-full-width {
    width: 100%;
}

/* WA Contact Page - Button Styles */
.mb-10 {
    margin-bottom: 10px;
}

.mt-10 {
    margin-top: 10px;
}

.btn-check-wa {
    background-color: #228974;
    border: 1px solid #228974;
}

.btn-check-wa:hover {
    background-color: #1a6b5a;
    border-color: #1a6b5a;
}

.btn-add-contact {
    background-color: #235D8E;
    border: 1px solid #235D8E;
}

.btn-add-contact:hover {
    background-color: #1a4a71;
    border-color: #1a4a71;
}

.btn-import-contact {
    background-color: #337AB7;
    border: 1px solid #337AB7;
}

.btn-import-contact:hover {
    background-color: #286090;
    border-color: #286090;
}

.btn-delete-all {
    background-color: #8B0000;
    border: 1px solid #8B0000;
}

.btn-delete-all:hover {
    background-color: #6d0000;
    border-color: #6d0000;
}

.btn-delete-active {
    background-color: #A52A2A;
    border: 1px solid #A52A2A;
    color: white;
}

.btn-delete-active:hover {
    background-color: #8b2323;
    border-color: #8b2323;
    color: white;
}

.btn-delete-notactive {
    background-color: #B22222;
    border: 1px solid #B22222;
}

.btn-delete-notactive:hover {
    background-color: #8b1a1a;
    border-color: #8b1a1a;
}

.col-wa-phone {
    width: 250px;
}

.col-status {
    width: 20px;
}

.fw-bold-span {
    font-weight: bold;
}

/* Select2 overrides for wa_group */
.select2-container .select2-search--inline .select2-search__field {
    font-size: 13px;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
    font-size: 12px;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option {
    font-size: 13px;
}

/* wa_template label warning style */
.label-warning {
    background-color: #f0ad4e;
}

/* Modal widths */
.modal-wa-wide {
    width: 800px;
}

/* Modal scroll container */
.modal-scroll-container {
    width: 100%;
    height: 400px;
    overflow: auto;
}

/* Table cell widths */
.col-name-wide {
    width: 200px;
}

/* Search input width */
#searchtext {
    width: 300px;
}

/* Nav tabs spacing */
.nav-tabs.nav-pills {
    gap: 0.10rem;
}

/* wa_template_detail styles */
.detail-container {
    display: flex;
    gap: 1px;
}

.info-section {
    flex: 0 0 40%;
    min-width: 0;
    padding: 20px 15px;
}

.preview-section {
    flex: 0 0 60%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #646060;
}

.phone-frame {
    width: 320px;
    height: 640px;
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border-radius: 40px;
    padding: 10px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    margin: 25px auto 0;
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 26px;
    background: #000;
    border-radius: 0 0 14px 14px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #ECE5DD;
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wa-header-bar {
    background: #128C7E;
    color: white;
    padding: 35px 12px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.wa-header-bar .avatar {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-chat-area {
    flex: 1;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABmJLR0QA/wD/AP+gvaeTAAABhklEQVR4nO3dMU7DQBBA0R3h+x+ZLiIFoqCgQGKxvfP+q9O4+DRrZ+04AAAAAAAAAAAAAAAAAAC+5LT2BVziPB/3fj0/8x6v1qc1GhFynh+r3LV0a0bI+fK4hrMk9nbj7bVr99bKiJBzd7J2Z+3DZW29hpz/7X87a4f+G2tXhNxcO7b/iJBu59x+sna4v7Z6D9nqT9dGhCy7c+4+XLvZ37W1K0LuLR37f0RIt3Nu/7Z2874m20Fa/enaiBCH2LH/R4R0O+f2k7VhfyvU7o+ujQhxiB37f0RIt3Nu/7Y2ZC9v8adrI0K6HWL7R9aG/a3QyhOxp2sjQpbdOXcfrg37W6GVJ2JP10aEnLtz7j5cG/a3Qnv8pWsjQpbdOXcfrg37W6H/8bfI+IgQh9ix/0eEdDvn9m9rw/5WaI9P1kaEdDvE9o+sDftboT2+N+g9IsTh9S5+f/z5s/kRId0Osf0ja8P+VmiPT9ZGhHQ7xPaPrA37W6E9PlkbEdLtENs/sjbsbwUA4G/4BSWjFxLTR6HOAAAAAElFTkSuQmCC');
    background-repeat: repeat;
    background-size: 100px;
    padding: 15px 10px;
    overflow-y: auto;
}

.wa-message {
    background: white;
    border-radius: 8px;
    padding: 8px 10px;
    min-width: 200px;
    max-width: 95%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-left: 8px;
}

.wa-message::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    border-width: 6px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

.wa-message-header {
    font-weight: 700;
    font-size: 14px;
    color: #303030;
    margin-bottom: 4px;
}

.wa-message-body {
    color: #303030;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.wa-message-footer {
    color: #667781;
    font-size: 10px;
    border-top: 1px solid #e9ecef;
    padding-top: 4px;
    margin-top: 4px;
}

.wa-button {
    display: block;
    text-align: center;
    padding: 6px;
    color: #128C7E;
    font-weight: 500;
    font-size: 12px;
    border-top: 1px solid #e9ecef;
    text-decoration: none;
    margin: 4px -10px -8px;
}

.wa-button:hover {
    background: rgba(18, 140, 126, 0.1);
    color: #128C7E;
}

.wa-button i {
    margin-right: 4px;
}

.wa-time {
    font-size: 9px;
    color: #667781;
    text-align: right;
    margin-top: 2px;
}

.param-highlight {
    background: rgba(37, 211, 102, 0.2);
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 500;
}

.param-placeholder {
    background: rgba(255, 193, 7, 0.3);
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 500;
    color: #856404;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #6c757d;
}

.info-value {
    font-weight: 600;
    text-align: right;
}

.media-header {
    background: #f8f9fa;
    padding: 12px;
    text-align: center;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 10px;
    color: #6c757d;
}

.media-header i {
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
    color: #128C7E;
}

.template-code {
    font-size: 11px;
}

.json-preview-pre {
    font-size: 9px;
    max-height: 250px;
    overflow: auto;
}

.wa-subheader {
    font-size: 9px;
}

@media (max-width: 768px) {
    .detail-container {
        flex-direction: column-reverse;
    }

    .preview-section {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }

    .phone-frame {
        width: 220px;
        height: 440px;
    }
}

/* ========================================
   Default Message Page Styles
   ======================================== */

/* Message Type Card Selection */
.message-type-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.message-type-card:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.message-type-card.active {
    border-color: #667eea;
    background-color: #f0f3ff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.message-type-card .card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.message-type-card.text-type .card-icon {
    color: #28a745;
}

.message-type-card.media-type .card-icon {
    color: #17a2b8;
}

.message-type-card.interactive-type .card-icon {
    color: #ffc107;
}

/* Type Content Panel */
.type-content-panel {
    display: none;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 20px;
}

.type-content-panel.active {
    display: block;
}

/* Button and List Items */
.button-item,
.list-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

/* Status Toggle */
.status-toggle {
    display: flex;
    gap: 10px;
}

.status-toggle .btn-check:checked+.btn-outline-success {
    background-color: #28a745;
    color: #fff;
}

.status-toggle .btn-check:checked+.btn-outline-danger {
    background-color: #dc3545;
    color: #fff;
}

/* Small Phone Frame for Default Message Preview */
.phone-frame-sm {
    width: 280px;
    height: 500px;
    border-radius: 36px;
    padding: 8px;
}

.phone-frame-sm::before {
    width: 80px;
    height: 22px;
    border-radius: 0 0 12px 12px;
}

.phone-frame-sm .phone-screen {
    border-radius: 28px;
}

.phone-frame-sm .wa-header-bar {
    padding: 30px 10px 10px;
    gap: 8px;
    font-size: 12px;
}

.phone-frame-sm .wa-header-bar .avatar {
    width: 32px;
    height: 32px;
}

.phone-frame-sm .wa-message {
    min-width: 150px;
    font-size: 12px;
    line-height: 1.4;
}

/* WA Message Text Style */
.wa-message-text {
    color: #111;
    word-wrap: break-word;
}

/* WA Media Preview */
.wa-media-preview {
    background: #f8f9fa;
    padding: 25px;
    text-align: center;
    border-radius: 6px;
    margin-bottom: 6px;
    color: #6c757d;
}

/* Preview Section Styles */
.preview-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.preview-section-dark {
    background-color: #646060;
    border-color: #4a4a4a;
}

.preview-section-rounded {
    padding: 20px;
    border-radius: 12px;
}

/* Phone Frame Scaling */
.phone-frame-sm {
    transform: scale(0.8);
    transform-origin: top center;
    margin-bottom: -100px;
    /* Offset the scale transform empty space */
}

/* Chatbot Unit/Rules Styles */
.unit-container {
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
}

.unit-item {
    cursor: grab;
}

.unit-item:active {
    cursor: grabbing;
}

.preview-subtitle {
    font-size: 9px;
}

.preview-footer {
    font-size: 11px;
}

.wa-time-check {
    color: #53bdeb;
}

/* Hide triangle arrow on tagsinput tags */
.tagsinput span.tag:after {
    display: none;
}

/* Ensure Sortable containers have min-height for drop targets */
#availableUnits,
#selectedUnits {
    min-height: 150px;
    display: block;
}

/* WhatsApp Message Bubble Styles */
.wa-bubble {
    background: #dcf8c6;
    border-radius: 8px;
    padding: 8px 12px;
    max-width: 100%;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.wa-bubble .wa-message {
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.wa-bubble .wa-time {
    text-align: right;
    margin-top: 4px;
}

.wa-bubble.wa-media .wa-media-placeholder {
    background: #e8f5e9;
    border-radius: 4px;
    padding: 30px;
    text-align: center;
    margin-bottom: 8px;
}

.wa-bubble.wa-document {
    background: #fff;
    border: 1px solid #ddd;
}

.wa-bubble.wa-interactive .wa-buttons button {
    font-size: 12px;
}

/* Sticky Preview Panel */
.sticky-preview {
    position: sticky;
    top: 10px;
}