

/* =========================================================
   RULES LINK
========================================================= */

.add-rules {
    margin-bottom: 20px;
    text-align: center;
}

.add-rules a {
    color: #000080;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: color .15s ease;
}

.add-rules a:hover {
    color: #a0522d;
    text-decoration: underline;
}

.add-rules span {
    color: red;
}


/* =========================================================
   FORM
========================================================= */

.add-form {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}


/* =========================================================
   LABEL
========================================================= */

.add-form label,
.add-code-title {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
    color: #222;
    font-size: 15px;
    font-weight: bold;
    line-height: 20px;
}

.add-form label b {
    color: red;
}

.add-code-title {
    margin-top: 25px;
}


/* =========================================================
   INPUT / SELECT / TEXTAREA
========================================================= */

.add-form input,
.add-form select,
.add-form textarea {
    display: block;
    width: 100%;
    padding: 10px;
    font-family: Arial, Sylfaen, "DejaVu Sans", sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #222;
    background: #f5f5f5;
    border: 1px solid #888;
    border-radius: 3px;
    outline: none;
    transition:
        border-color .15s ease,
        background-color .15s ease,
        box-shadow .15s ease;
}

.add-form select {
    min-height: 42px;
    padding-right: 35px;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
}

.add-form textarea {
    min-height: 150px;
    resize: vertical;
}

.add-form input::placeholder,
.add-form textarea::placeholder {
    color: #777;
    opacity: 1;
}

.add-form input:focus,
.add-form select:focus,
.add-form textarea:focus {
    border-color: #a0522d;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(160, 82, 45, .12);
}


/* =========================================================
   FIELD STATES (JS ამატებს)
========================================================= */

.add-form input.is-invalid,
.add-form select.is-invalid,
.add-form textarea.is-invalid {
    border-color: #c62828;
    background: #fff7f7;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, .10);
}

.add-form input.is-valid,
.add-form select.is-valid,
.add-form textarea.is-valid {
    border-color: #218838;
    background: #f8fff9;
}


/* =========================================================
   FIELD ERROR HINT (ველის ქვეშ)
========================================================= */

.add-field-error {
    margin-top: 5px;
    margin-bottom: 2px;
    color: #c62828;
    font-size: 13px;
    font-weight: bold;
    line-height: 19px;
    text-align: left;
}

.add-field-error::before {
    content: "⚠ ";
    font-size: 12px;
}


/* =========================================================
   CHARACTER COUNTER
========================================================= */

.add-counter {
    margin-top: 4px;
    color: #666;
    font-size: 12px;
    line-height: 18px;
    text-align: right;
}


/* =========================================================
   GENERAL ERROR (ფორმის თავზე, სერვერის შეცდომებისთვის)
========================================================= */

.add-error {
    display: none;
    width: 100%;
    max-width: 520px;
    margin: 0 auto 18px;
    padding: 12px 15px;
    background: #f8d7da;
    border: 1px solid #e0a0a5;
    border-left: 4px solid #c62828;
    border-radius: 4px;
    color: #8b1e25;
    font-size: 14px;
    font-weight: bold;
    line-height: 21px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .12);
}


/* =========================================================
   SUCCESS MESSAGE (textarea-სა და ღილაკს შორის)
========================================================= */

.add-success {
    display: none;
    width: 100%;
    margin: 20px 0 0;
    padding: 12px 15px;
    background: #dff0d8;
    border: 1px solid #a3d18f;
    border-left: 4px solid #218838;
    border-radius: 4px;
    color: #2d6a1f;
    font-size: 14px;
    font-weight: bold;
    line-height: 21px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .12);
}

.add-success.show {
    display: block;
}

.add-success + button {
    margin-top: 15px;
}


/* =========================================================
   BANNER
========================================================= */

.add-banner-title {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #222;
    font-weight: bold;
    text-align: center;
}

.add-banner-img {
    display: block;
    width: 88px;
    height: 31px;
    margin: 0 auto;
    border: 0;
}

.add-form .add-banner-code {
    min-height: 150px;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 12px;
    line-height: 18px;
    color: #333;
    background: #e9e9e9;
    cursor: text;
}


/* =========================================================
   SUBMIT BUTTON
========================================================= */

.add-form button {
    display: block;
    margin: 25px auto 0;
    padding: 10px 35px;
    background: #a0522d;
    color: #ffffff;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    font-family: Arial, Sylfaen, "DejaVu Sans", sans-serif;
    font-size: 16px;
    font-weight: bold;
    line-height: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .18);
    transition:
        background-color .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

.add-form button:hover {
    background: #cd853f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, .22);
}

.add-form button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .18);
}

.add-form button:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
}


/* =========================================================
   MOBILE
========================================================= */

@media screen and (max-width: 600px) {

    .add-rules {
        margin-bottom: 18px;
    }

    .add-rules a {
        font-size: 14px;
        line-height: 20px;
    }

    .add-form {
        max-width: 100%;
    }

    .add-form label {
        margin-top: 13px;
        margin-bottom: 5px;
        font-size: 14px;
        line-height: 19px;
    }

    .add-code-title {
        margin-top: 22px;
        margin-bottom: 5px;
        font-size: 14px;
        line-height: 19px;
    }

    .add-form textarea {
        min-height: 140px;
    }

    .add-field-error {
        margin-top: 4px;
        font-size: 12px;
        line-height: 18px;
    }

    .add-field-error::before {
        font-size: 11px;
    }

    .add-error {
        margin-bottom: 15px;
        padding: 10px 11px;
        font-size: 13px;
        line-height: 19px;
    }

    .add-success {
        padding: 10px 11px;
        font-size: 13px;
        line-height: 19px;
    }

    .add-banner-title {
        margin-top: 22px;
        margin-bottom: 13px;
        font-size: 14px;
    }

    .add-form .add-banner-code {
        min-height: 165px;
        font-size: 11px;
        line-height: 17px;
    }

    .add-form button {
        min-width: 150px;
        margin-top: 22px;
        padding: 10px 28px;
        font-size: 15px;
    }
}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media screen and (max-width: 380px) {

    .add-form input,
    .add-form select,
    .add-form textarea {
        font-size: 13px;
    }

    .add-form label,
    .add-code-title {
        font-size: 13px;
    }

    .add-field-error {
        line-height: 17px;
    }

    .add-error {
        font-size: 12px;
        line-height: 18px;
    }

    .add-form .add-banner-code {
        font-size: 10px;
        line-height: 16px;
    }
}
