/* Custom scrollbar styles */
::-webkit-scrollbar {
  width: 2px;
  height: 2px;
}

::-webkit-scrollbar-track {
  background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
  background: #555;
}

::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* Custom styles to complement Bootstrap */
.broadcast-form {
    font-family: Inter, Helvetica, sans-serif;
}

.elementor-widget-sender-gate-broadcast .broadcast-form {
    padding: 20px;
    border-radius: 8px;
    background-color: #fff;
}

.sender-gate-image-upload-area {
    width: 125px;
    height: 125px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.5s ease;
}

.sender-gate-image-upload-area:hover {
    background-color: #E9E9E9;
}

.sender-gate-image-upload-area.sender-gate-drag-over {
    background-color: #e9ecef;
    border-color: #0d6efd;
}

.sender-gate-upload-icon {
    font-size: 24px;
    color: #6c757d;
    font-weight: bold;
}

.sender-gate-image-preview {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 100%;
    text-align: center;
}

.sender-gate-image-preview img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    border-radius: 6px !important;
    border: 1px solid #dee2e6;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: .6rem;
}

#sender_gate_inviter_name, #sender_gate_api_key {
    font-size: 13px;
    border: 1px solid rgb(197, 197, 197);
    border-radius: 4px 0 0 4px !important;
    background-color: #fbfbfb !important;
}

.form-text {
    font-size: 12px;
}

.form-control {
    font-size: 13px;
    border: 1px solid rgb(197, 197, 197);
    border-radius: 4px !important;
    background-color: #fbfbfb !important;
}

.form-control::placeholder, input::placeholder {
    color: #CCC !important;
}

#sender_gate_guests {
    min-height: 180px !important;
}

#sender_gate_message {
    min-height: 350px !important;
}

.form-select {
    font-size: 13px;
}

.link-template-tamu {
    color: #01928B;
    font-weight: 500;
    transition: all 0.3s ease;
}

.link-template-tamu:hover {
    color: #00615C;
    font-weight: 600;
}

.add-device {
    font-size: 13px;
    color: #FFF;
    background-color: #01928B;
    width: 100%;
    border-radius: 0 4px 4px 0;
    padding: 8px 2px;
}

.import-template {
    font-size: 13px;
    color: #FFF;
    background-color: #01928B;
    width: 100%;
    border-radius: 4px;
    padding: 8px 2px;
}

.add-device:hover, .add-device:active, .add-device:focus-visible, .import-template:hover, .import-template:active, .import-template:focus, .import-template:focus-visible {
    color: #FFF !important;
    background-color: #00615C !important;
}

#sender-gate-submit-button, #sender-gate-report-button {
    font-size: 13px;
    width: 100%;
}

#sender-gate-submit-button {
    color: #FFF;
    background-color: #1AA313;
    border: 0;
    border-radius: 4px;
}

#sender-gate-submit-button:hover, #sender-gate-submit-button:active, #sender-gate-submit-button:focus-visible, #sender-gate-submit-button:focus {
    background-color: #116C0C;
}

.invalid-feedback {
    font-size: 12px;
}

.btn-secondary{
    color: #FFF !important;
    background-color: #01928B !important;
    border: 0 !important;
    border-radius: 4px !important;
}

.btn-secondary:disabled,
.btn-secondary[disabled]{
    background-color: #7F7F7F !important;
}

.btn-secondary:hover{
    background-color: #00615C !important;
}

.sender-gate-close-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background-color: #EE1E1E;
    color: #FFF;
    font-weight: bold;
    border: none;
    border-radius: 100%;
    font-size: 14px;
    padding: 0;
    text-align: center;
}

.sender-gate-close-preview:hover, .sender-gate-close-preview:focus {
    scale: 0.9;
    color: #EE1E1E;
    background-color: #FFF;
}

.sender-gate-report-summary{
    font-size: 12px;
}

.sender-gate-report-table {
    font-size: 12px;
    width: 100%;
    border-collapse: collapse;
    font-family: 'Roboto', Arial, sans-serif;
    overflow-x: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sender-gate-report-table th {
    background-color: #00534F;
    color: #FFFFFF;
    font-weight: bold;
    padding: 12px;
    text-align: left;
    border: 1px solid #FFFFFF50 !important;
}

.sender-gate-report-table td {
    padding: 10px;
    border-bottom: 1px solid #00534F50;
    vertical-align: middle;
}

.sender-gate-report-table tr {
    background-color: #FFFFFF;
}

.sender-gate-report-table tr:hover {
    background-color: #F5F6F5;
}

table td, table th{
    border: 1px solid #00534F50 !important;
}

.sender-gate-report-table .status {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    text-align: center;
}

.sender-gate-report-table .sukses {
    color: #27AE60;
    background-color: #E8F8F5;
}

.sender-gate-report-table .gagal {
    color: #E74C3C;
    background-color: #FDEDEC;
}

.sender-gate-report-table .menunggu {
    color: #F39C12;
    background-color: #FEF9E7;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.progress {
    height: 1.2rem;
    --bs-progress-bg: #f0f0f0;
    background: linear-gradient(
        90deg,
        #e0e0e0 0%,
        #d0d0d0 50%,
        #e0e0e0 100%
    );
    background-size: 200% 100%;
    animation: progressBgAnimation 2s infinite linear;
}

#sender-gate-progress {
    position: relative;
    background: linear-gradient(
        90deg,
        #01928B 0%,
        #00615C 50%,
        #01928B 100%
    );
    background-size: 200% 100%;
    animation: loadingAnimation 2s infinite linear;
}

#sender-gate-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    z-index: 10;
    text-align: center;
    width: 100%;
    white-space: nowrap;
}

@keyframes loadingAnimation {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes progressBgAnimation {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.text-countdown{
    font-size: 13px;
}

.btn-close-report{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    right: 14px;
    position: absolute;
    height: 1.5em;
    width: 1.5em;
    background: #ee1e1e10;
    border-radius: 8px;
    cursor: pointer;
    font-size: 22px;
    color: #EE1E1E;
    -webkit-text-stroke: 1px #EE1E1E;
    transition: all 0.3s ease;
}

.btn-close-report:hover{
    background: #9E1414;
    color: #FFF;
    -webkit-text-stroke: 1px #FFF;
}

.sec-count{
    background: green;
}

.sec-success{
    background: #EAF9EA;
    border-radius: 8px 0 0 0;
}

.sec-pendding{
    background: #fbfac8;
}

.sec-failed{
    background: #F2E1E1;
}

.btn-export{
    color: #FFF;
    font-size: 12px;
    border: none;
    border-radius: 0 8px 0 0;
    width: 100%;
    padding: .25rem !important;
    background: #01928B;
}

.btn-export:hover, .btn-export:active, .btn-export:focus{
    color: #FFF;
    background: #00615C;
}

.dropdown-item{
    font-size: 12px;
}

.sender-gate-qr-code {
    max-width: 200px;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.swal2-popup {
    max-width: calc(500px - 2em) !important;
    border-radius: 8px !important;
}

.swal2-icon {
    font-size: 12px !important;
}

.swal-title-custom {
    font-size: 20px !important;
}

.swal-text-custom {
    font-size: 14px !important;
}

.swal2-confirm.btn-primary {
    font-size: 13px !important;
    color: #FFF !important;
    background-color: #01928B !important;
    border-radius: 4px !important;
    border: none !important;
}

.swal2-confirm.btn-primary:hover {
    background-color: #00615C !important;
}

.swal2-close {
    background-color: #EE1E1E !important;
    color: #FFF !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    font-size: 16px !important;
    line-height: 28px !important;
    text-align: center !important;
}

.swal2-close:hover, .swal2-close:focus {
    background-color: #FFF !important;
    color: #EE1E1E !important;
    scale: 0.9 !important;
}

.swal2-success{
    border-color: #01928B !important;
    color: #00615C !important;
}

.swal2-success [class^=swal2-success-line]{
    background-color: #00615C !important;
}

.swal2-success-ring{
    border: .25em solid rgb(1 146 139 / 10%) !important;
}

.swal2-error{
    border-color: #EE1E1E !important;
    color: #EE1E1E !important;
}

.swal2-error [class^=swal2-x-mark-line]{
    background-color: #EE1E1E !important;
}

@media (max-width: 576px) {
    .sender-gate-image-upload-area {
        width: 125px;
        height: 125px;
    }

    .sender-gate-upload-icon {
        font-size: 20px;
    }

    .sender-gate-close-preview {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .modal-dialog-centered {
        min-height: calc(100% - 0.5rem);
    }

    #sender-gate-progress-text {
        font-size: 12px;
    }

    .sender-gate-qr-code {
        max-width: 150px;
    }

    .swal2-popup {
        max-width: 95% !important;
    }
    
    .sender-gate-report-table {
        display: block;
        overflow-x: auto;
        max-height: calc(95vh - 300px);
    }
    .sender-gate-report-table th,
    .sender-gate-report-table td {
        width: auto;
    }

    .sec-failed{
        border-radius: 0 8px 0 0;
    }
    
    .btn-export{
        border-radius: 0;
    }
}