/*

 */

@tailwind base;
@tailwind components;
@tailwind utilities;

/* Temporal aggregation selector styles */
.temporal-btn.active-temporal {
  @apply bg-gray-200 text-gray-900 font-semibold;
}

[x-cloak] { display: none !important; }

.filter-period-date-picker {
    margin-top: 42px !important;
}

@font-face {
    font-family: TiroBangla;
    font-style: italic;
    src: url(https://assets.feedae.com/assets/TiroBangla-Italic-fb519ad9918f1f48998b2bee2fab8852b4b0b5c77eb24742d764496db3c1793a.ttf);
}

html {
    font-family: Helvetica Neue, sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    color: theme('colors.feedae-neutral.700');
}


[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    border-color: theme('colors.feedae-neutral.300');
    border-radius: 0;
    border-width: 1px;
    font-size: 1rem;
    line-height: 1.5rem;
    padding: .5rem .75rem;
    --tw-shadow: 0 0 #0000
}

[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,
[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,
[type=week]:focus,input:where(:not([type])):focus,select:focus,div[contenteditable]:focus {
    --tw-ring-color: theme('colors.feedae-orange.DEFAULT');
    border-color: theme('colors.feedae-orange.DEFAULT');
    border-radius: 2pt;
    outline: none;
}

textarea:focus {
    --tw-ring-color: theme('colors.feedae-orange.DEFAULT');
    border-color: theme('colors.feedae-orange.DEFAULT');
    border-radius: 2pt;
    outline: 1px solid theme('colors.feedae-orange.DEFAULT');
}
div[contenteditable] {
    border: 1px solid theme('colors.feedae-neutral.300');
    border-radius: 2pt;
    &:focus {
        outline: 1px solid theme('colors.feedae-orange.DEFAULT');
    }
}

[type=checkbox],[type=radio] {
    border-color: theme('colors.feedae-neutral.300');
    color: theme('colors.feedae-orange.DEFAULT');
    --tw-ring-color: theme('colors.feedae-orange.DEFAULT');
    &:focus {
        color: theme('colors.feedae-orange.DEFAULT');
        --tw-ring-color: theme('colors.feedae-orange.DEFAULT');
    }
}

::backdrop, *, :after, :before {
    --tw-ring-color: transparent;
}

.feedae-gray-table {
    .table-header-group .table-row {
        background-color: theme('colors.feedae-neutral.100');
        :first-child.table-cell {
            border-top-left-radius: 1rem;
        }
        :last-child.table-cell {
            border-top-right-radius: 1rem;
        }
    }
    .table-row-group .table-row {
        &:hover {
            background-color: theme('colors.feedae-neutral.100');
        }
        .table-cell {
            border-top: 1px solid theme('colors.feedae-neutral.400');
        }
        &:last-child {
            .table-cell {
                border-top: 1px solid theme('colors.feedae-neutral.400');
            }
        }
    }
    border-color: theme('colors.feedae-neutral.400');
}

.right-messages {
    border-radius: 8px;
    padding: 15px 15px;
    margin-top: 6px;
    margin-bottom: 6px;
    display: inline-block;
    color: theme('colors.feedae-marron.DEFAULT');
    background: theme('colors.feedae-orange.100');
    position: relative;
    margin-left: 25%;
}

.left-messages {
    border-radius: 8px;
    padding: 15px 15px;
    margin-top: 6px;
    margin-bottom: 6px;
    display: inline-block;
    background: theme('colors.feedae-neutral.100');
    margin-right: 25%;
    position: relative;
}

.left-messages.selected {
    background: #ecfccb fixed;
}

.left-messages.selected:before {
    content: "";
    position: absolute;
    z-index: 0;
    bottom: 0;
    left: -7px;
    height: 20px;
    width: 20px;
    border-bottom-right-radius: 15px;
}

.left-messages.selected:after {
    content: "";
    position: absolute;
    z-index: 1;
    bottom: 0;
    left: -10px;
    width: 10px;
    height: 20px;
    background: white;
    border-bottom-right-radius: 10px;
}

.right-messages.selected {
    background: #ecfccb fixed;
    color: black;
}

.right-messages.selected:before {
    content: "";
    position: absolute;
    z-index: 0;
    bottom: 0;
    right: -8px;
    height: 20px;
    width: 20px;
    border-bottom-left-radius: 15px;
}

.right-messages.selected:after {
    content: "";
    position: absolute;
    z-index: 1;
    bottom: 0;
    right: -10px;
    width: 10px;
    height: 20px;
    background: white;
    border-bottom-left-radius: 10px;
}

.dropdown {
    min-height: 34px;

    .hidden-title {
        color: white;
    }
    select {
        background: transparent;
        cursor: pointer;
        border: none;
    }
}

.dropdown-selected {
    background: theme('colors.feedae-orange.600');

    .count {
        color: theme('colors.feedae-orange.600');
        font-size: 13px;
    }

    .hidden-title {
        color: theme('colors.feedae-orange.600');
    }

    select {
        color: white;

        option {
            color: theme('colors.feedae-cool-gray.600');
        }
    }
}

a[disabled="disabled"] {
    /*pointer-events: none;*/
    color: theme('colors.feedae-neutral.500');
    &:hover {
        color: theme('colors.feedae-neutral.500');
    }
}

.feedae-sidebar-item {
    &.selected {
        border: 1px solid theme('colors.feedae-neutral.300');
    }
    &:hover, &.selected {
        background: #FFFFFF;
        color: theme('colors.feedae-orange.600');
        svg {
            fill: theme('colors.feedae-orange.600');
            rect {
                fill: theme('colors.feedae-orange.600');
            }
            path {
                fill: theme('colors.feedae-orange.600');
            }
            &.stroke-mode {
                fill: none;
                stroke: theme('colors.feedae-orange.600');
                rect {
                    fill: none;
                    stroke: theme('colors.feedae-orange.600');
                }
                path {
                    fill: none;
                    stroke: theme('colors.feedae-orange.600');
                }
            }
        }
        .icon {
            color: theme('colors.feedae-orange.600');
            border-color: theme('colors.feedae-orange.600');
        }
    }
}

div[contenteditable=true]:empty:not(:focus):before {
    content: attr(data-placeholder);
    color: theme('colors.feedae-neutral.700');
}

@theme {
    --font-tiro: "TiroBangla";
    --animate-hide: hide 150ms cubic-bezier(0.16, 1, 0.3, 1);
    --animate-slide-down-and-fade: slideDownAndFade 150ms cubic-bezier(0.16, 1, 0.3, 1);
    --animate-slide-left-and-fade: slideLeftAndFade 150ms cubic-bezier(0.16, 1, 0.3, 1);
    --animate-slide-up-and-fade: slideUpAndFade 150ms cubic-bezier(0.16, 1, 0.3, 1);
    --animate-slide-right-and-fade: slideRightAndFade 150ms cubic-bezier(0.16, 1, 0.3, 1);

    @keyframes hide {
        from {
            opacity: 1;
        }
        to {
            opacity: 0;
        }
    }
    @keyframes slideDownAndFade {
        from {
            opacity: 0;
            transform: translateY(-6px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    @keyframes slideLeftAndFade {
        from {
            opacity: 0;
            transform: translateX(6px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    @keyframes slideUpAndFade {
        from {
            opacity: 0;
            transform: translateY(6px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    @keyframes slideRightAndFade {
        from {
            opacity: 0;
            transform: translateX(-6px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

.feedae-disable-border-right-left-button {
    button {
        border-left: none;
        border-right: none;
        border-radius: 0;
        box-shadow: none;
    }
}

.feedy-button {
    position: relative;

    .custom-shadow {
        width: 100%;
        height: 48px;
        display: block;
        position: absolute;
        border-radius: 56px;
        top: 0;
        left: 0;
    }

    .level1 {
        box-shadow: 0px 0px 0px 6px theme('colors.feedae-orange.DEFAULT / 15%');
    }

    .level2 {
        box-shadow: 0px 2px 0px 2px #FFFFFF29 inset;
    }

    .level3 {
        box-shadow: 0px -2px 0px 2px #00000057 inset;
    }

    background: theme('colors.feedae-orange.DEFAULT');
    width: 48px;
    height: 48px;
    opacity: 1;
    border-radius: 56px;
    transition: width 0.3s ease;

    svg {
        min-width: 48px;
    }

    &:hover {
        width: 190px;

        .label {
            opacity: 1;
            white-space: nowrap;
        }
    }

    .label {
        transition: opacity 1s ease;
        white-space: nowrap;
        opacity: 0;
    }
}

#gleap-badge {
    padding: 0px 4px;
    height: 20px;
    min-width: 20px;
    border-radius: 20px;
    background-color: theme('colors.feedae-orange.DEFAULT');
    color: #fff;
    font-size: 10px;
    font-family: sans-serif;
    text-align: center;
    line-height: 20px;
    &.minimized {
        height: 15px;
        min-width: 15px;
        margin-left: -40px;
        margin-top: -13px;
        line-height: 15px;
    }
}

.feedy-container {
    animation: feedyFadeInUp 0.3s forwards;
    opacity: 0;
}


@keyframes feedyFadeInUp {
    0% {
        opacity: 0;
        max-height: 100px;
        transform: translate3d(0, 20px, 0);
    }

    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        max-height: 100%;
    }
}

.alert-message {
    animation: fadeOut 4s ease-in-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
/* Dashboard Sortable Styles */
.sortable-ghost {
    opacity: 0.4;
    background: #f3f4f6;
    transform: rotate(2deg);
}

.sortable-chosen {
    cursor: grabbing;
    transform: scale(1.02);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.sortable-drag {
    transform: rotate(-2deg);
    opacity: 0.8;
}

/* Prevent text selection during drag */
[data-controller="dashboard-sortable"] {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

[data-controller="dashboard-sortable"] * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Re-enable text selection for specific elements */
[data-controller="dashboard-sortable"] input,
[data-controller="dashboard-sortable"] textarea {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

.dashboard-chart-choice {
    &.selected {
        border-color: theme('colors.feedae-orange.200');
        background-color: theme('colors.feedae-orange.100');
        rect {
            fill: theme('colors.feedae-marron.DEFAULT');
        }
        svg, path {
            fill: theme('colors.feedae-marron.DEFAULT');
        }
        circle {
            fill: theme('colors.feedae-marron.DEFAULT');
        }
    }
}

.feedae-delete-button-red {
    svg, path {
        fill: theme('colors.feedae-red-dark.DEFAULT');
        stroke: theme('colors.feedae-red-dark.DEFAULT');
    }
}

/* Pill colors - used dynamically with pill-#{index} */
.pill-1 {
    color: #E15546;
    background: rgba(225, 85, 70, 0.15);
}

.pill-2 {
    color: #465A50;
    background: rgba(70, 90, 80, 0.15);
    svg { path { stroke: #465A50; } }
}

.pill-3 {
    color: #F28B7D;
    background: rgba(242, 139, 125, 0.15);
    svg { path { stroke: #F28B7D; } }
}

.pill-4 {
    color: #5A6EE1;
    background: rgba(90, 110, 225, 0.15);
    svg { path { stroke: #5A6EE1; } }
}

.pill-5 {
    color: #F3A182;
    background: rgba(243, 161, 130, 0.15);
    svg { path { stroke: #F3A182; } }
}

.pill-6 {
    color: #141414;
    background: rgba(20, 20, 20, 0.15);
    svg { path { stroke: #141414; } }
}

.pill-7 {
    color: #E1785A;
    background: rgba(225, 120, 90, 0.15);
}

.pill-8 {
    color: #462319;
    background: rgba(70, 35, 25, 0.15);
    svg { path { stroke: #462319; } }
}

.pill-9 {
    color: #8A9EF0;
    background: rgba(138, 158, 240, 0.15);
    svg { path { stroke: #8A9EF0; } }
}

.pill-10 {
    color: #6E8379;
    background: rgba(110, 131, 121, 0.15);
    svg { path { stroke: #6E8379; } }
}

.pill-gray {
    color: #6B7280;
    background: rgba(107, 114, 128, 0.15);
    svg { path { stroke: #6B7280; } }
}

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
