/* Dodatki do oryginalnego style.css: formularz, wynik i widok mobilny. */

#content-home .ad-slot {
    clear: both;
    text-align: center;
    margin: 0 0 15px;
    color: #7a7a7a;
}

#main-right .ad-slot {
    margin-top: 20px;
}

/* --- Pola wyboru języka --- */

.lang-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.lang-bar select {
    flex: 1 1 0;
    min-width: 0;
    padding: 7px 8px;
    font-size: 13px;
    font-family: inherit;
    color: #444;
    background: #fff;
    border: 1px solid #bcd7e2;
    border-radius: 4px;
}

.lang-bar select:focus,
.txt:focus {
    outline: none;
    border-color: #2f8fb4;
    box-shadow: 0 0 0 2px rgba(47, 143, 180, .2);
}

#swap {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    font-size: 17px;
    line-height: 1;
    color: #2f8fb4;
    cursor: pointer;
    background: #fff;
    border: 1px solid #bcd7e2;
    border-radius: 4px;
}

#swap:hover {
    background: #eaf6fb;
}

/* --- Pole tekstowe --- */

textarea.txt {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    font: 13px/1.5 Arial, Helvetica, sans-serif;
    color: #444;
    resize: vertical;
    border: 1px solid #bcd7e2;
    border-radius: 4px;
}

.meta-bar {
    display: flex;
    justify-content: space-between;
    margin: 6px 0 12px;
    font-size: 11px;
    color: #8b8b8b;
}

.meta-bar .over {
    font-weight: bold;
    color: #c0392b;
}

/* --- Przyciski --- */

.actions {
    display: flex;
    gap: 10px;
}

.btn-primary,
.btn-secondary {
    padding: 9px 20px;
    font: bold 13px/1 Arial, Helvetica, sans-serif;
    cursor: pointer;
    border: none;
    border-radius: 4px;
}

.btn-primary {
    color: #fff;
    background: #2f8fb4;
}

.btn-primary:hover {
    background: #26768f;
}

.btn-primary[disabled] {
    cursor: default;
    background: #9dc4d3;
}

.btn-secondary {
    color: #33697f;
    background: #e3f1f7;
    border: 1px solid #bcd7e2;
}

.btn-secondary:hover {
    background: #d2e8f1;
}

/* --- Wynik --- */

.result-box {
    min-height: 200px;
    padding: 14px;
    background: #f7fbfd;
    border: 1px solid #dcecf3;
    border-radius: 4px;
}

.result-intro p {
    margin: 0 0 .8em;
}

.result-status {
    margin-bottom: 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b8a97;
}

.result-status.error {
    font-weight: bold;
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    color: #c0392b;
}

.result-status.loading::after {
    content: ' \25CF\25CF\25CF';
    animation: blink 1s steps(3, end) infinite;
}

@keyframes blink {
    0%   { opacity: .25; }
    50%  { opacity: 1; }
    100% { opacity: .25; }
}

.result-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.result-actions {
    margin-top: 14px;
}

.clear {
    clear: both;
}

/* --- Widok mobilny: nadpisuje sztywne szerokości z oryginalnego style.css --- */

@media (max-width: 940px) {
    #container,
    #footer-home {
        width: auto;
        max-width: 900px;
        padding-left: 12px;
        padding-right: 12px;
    }

    #content-home {
        box-sizing: border-box;
        float: none;
        width: 100%;
        padding: 18px 15px;
        background-image: none;
        border-radius: 6px;
    }

    #main-left,
    #main-right {
        float: none;
        width: 100%;
        display: block;
    }

    #main-right {
        margin-top: 22px;
    }

    #mainbar,
    #flow {
        width: auto;
        margin-left: 0;
        background-size: cover;
    }
}

@media (max-width: 620px) {
    #mainbar {
        display: none;
    }

    #header h1 {
        float: none;
        width: 100%;
        background-position: center center;
    }

    .lang-bar {
        flex-wrap: wrap;
    }

    .lang-bar select {
        flex: 1 1 100%;
    }

    #swap {
        width: 100%;
        height: 30px;
    }

    .actions .btn-primary,
    .actions .btn-secondary {
        flex: 1 1 0;
    }
}
