/* ============================================================================
   find-replace.css - FIND & REPLACE tool only
   ============================================================================
   Loaded by:  text-tools/find-and-replace.php
   Purpose:    Unique UI for this tool: toggle switches (.switch, .switch-label),
               twin inputs (#findPhrase / #replaceWithPhrase), pre output,
               .find-replace-inputs, .result-message, textarea (270px).
   Load order: Load AFTER tool-input.css - overrides its textarea height.
   ============================================================================ */

textarea {
    width: 100%;
    height: 270px;
    padding: 10px;
    border: 1px solid #ccc;
    resize: vertical;
    margin: 3px 0
}

pre {
    display: block;
    margin-top: 2rem;
    margin-bottom: 2rem;
    overflow: auto;
    font-size: .975em;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: 10px;
}

.options {
    display: inline-flex;
    align-items: center;
    margin-left: 20px;
}

.switch-input {
    display: none;
}

.switch-label {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 25px;
    background: #fe7474;
    cursor: pointer;
    position: absolute;
    top: 0;
    transition: background-color 0.3s;
}

.switch-input:checked + .switch-label {
    background: #59ab6e;
}

.switch-label::after {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    position: absolute;
    top: 50%;
    left: 2px;
    transform: translate(0, -50%);
    transition: transform 0.3s;
}

.switch-input:checked + .switch-label::after {
    left: calc(100% - 22px);
    transform: translate(0, -50%);
}

.content-area {
    margin-top: 10px;
    width: 100%;
}	

.button-container {
    margin-top: 10px;
    text-align: center;
}

.result-message {
    text-align: center;
}

.find-replace-inputs {
    display: flex;
    margin-top: 25px;
	margin-left: 30px;
    justify-content: space-between;
	max-width: 90%;
}

#replaceButton,
#clearButton {
    margin: 0 10px;
}

#findPhrase, #replaceWithPhrase {
    width:41%;
	height:48px;
}

.btn{
    vertical-align: initial;
}

@media only screen and (max-width: 500px) {
    .find-replace-inputs {
        display: inline-block;
    }
    #findPhrase, #replaceWithPhrase {
    width:100%;}

    textarea {
        font-size: 15px;
    }
}
