/* FormTemplater - Sdílené styly pro editor formulářů */
/* Všechny třídy mají prefix "frm-" pro zajištění jedinečnosti */

/* =================================
   Základní styly pro elementy
   ================================= */

.frm-no-border {
    border: none !important;
}

    .frm-no-border:hover {
        border: none !important;
    }

    .frm-no-border:focus {
        border: none !important;
    }

.frm-element-wrapper {
    margin: 8px 0px;
    border: solid thin dimgray;
    min-height: 40px;
    border-radius: 5px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    background-color: wheat;
    padding: 2px 5px;
}

.frm-element {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.frm-selected {
    border-radius: 5px;
    border: 3px dotted orangered;
    padding: 0px !important;
    margin: 0px !important;
}

.frm-drag-over {
    border: 2px dashed var(--rz-primary);
    border-radius: 5px;
    background: #e9f5ff;
}

/* =================================
   Wrapper styly pro typy elementů
   ================================= */

.frm-expression-wrapper {
    background-color: lightgreen;
}

.frm-table-wrapper {
    background-color: honeydew;
}

.frm-text-wrapper {
    background-color: white;
    border: none;
}

.frm-help-wrapper {
    background-color: white;
    border: none;
}

.frm-line-wrapper {
    margin-top: 5px;
    background-color: white;
    border-top: 3px solid dimgray;
}

.frm-linebreak-wrapper {
    background-color: white;
}

.frm-small-space-wrapper {
    background-color: white;
}

.frm-medium-space-wrapper {
    background-color: white;
}

.frm-large-space-wrapper {
    background-color: white;
}

.frm-heading-wrapper {
    background-color: white;
    border: none;
}

/* =================================
   Styly pro skupiny
   ================================= */

.frm-group-wrapper {
    margin: 10px 0;
    background-image: linear-gradient(to right, #eeeeee 1px, transparent 1px), linear-gradient(to bottom, #eeeeee 1px, transparent 1px);
    background-size: calc(100% / 12) 56px;
    border-bottom: 1px solid #eeeeee;
    border-right: 1px solid #eeeeee;
}

/* =================================
   Styly pro panel nástrojů (sidebar)
   ================================= */

.frm-toolbox-button {
    position: fixed;
    right: 0;
    top: 5px;
    bottom: 5px;
}

.frm-source-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.frm-source-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    cursor: grab;
    min-width: 80px;
    background-color: #f8f9fa;
}

    .frm-source-item:hover {
        background-color: #e9ecef;
        border-color: #adb5bd;
    }

/* =================================
   Utility styly
   ================================= */

.frm-preserve-lines {
    white-space: pre-wrap;
    word-break: break-word;
}
