/* ============================================
   FORMS - reusable form layout and elements
   ============================================ */

/* Vertical centering wrapper - place around .form to center it in a flex/grid parent */
.form-center {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Form container */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 40px;
    box-sizing: border-box;

    /* Header */
    h2 {
        font-size: 1.6rem;
        font-weight: 600;
        margin: 0;
        color: #1a1a1a;
    }

    /* Description */
    p {
        color: #666;
        margin: 0;
        line-height: 1.5;
    }

    /* Input fields */
    .input {
        width: 100%;
        padding: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 1rem;
        box-sizing: border-box;

        &:focus {
            outline: none;
            border-color: #007bff;
            box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
        }

        &::placeholder {
            color: #999;
        }
    }

    /* Field group - stacks inputs with tighter gap */
    .fields {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    /* Button */
    .button {
        text-align: center;
        width: 100%;
        padding: 10px;
        background-color: #404499;
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: background-color 0.2s;

        &:hover {
            background-color: #0056b3;
        }

        span, img {
            vertical-align: text-bottom;
        }

        .icon {
            margin-right: 7px;
        }

        .thumb {
            height: 20px;
            width: 20px;
            margin-right: 10px;
            object-fit: contain;
            display: inline-block;
        }

        &.grey {
            background-color: #666;
        }

        &.pale {
            background-color: #aaabbb;
        }

        &.disabled {
            opacity: 0.25;
            cursor: default;
            filter: grayscale(0.5);
        }
    }

    /* Separator - "or" divider between sections */
    .separator {
        display: flex;
        align-items: center;
        gap: 15px;
        margin: 10px 0;

        .line {
            flex: 1;
            height: 1px;
            background-color: #ddd;
        }

        .or {
            color: #666;
            font-size: 0.875rem;
            font-weight: 500;
        }
    }

    /* Feedback message */
    .feedback {
        font-size: 0.875rem;
        padding: 10px 14px;
        border-radius: 8px;
        display: none;

        &.error {
            display: block;
            background-color: #fff0f0;
            color: #c0392b;
            border: 1px solid #f5c6cb;
        }

        &.success {
            display: block;
            background-color: #f0fff4;
            color: #27ae60;
            border: 1px solid #c3e6cb;
        }

        &.info {
            display: block;
            background-color: #f0f4ff;
            color: #2c5282;
            border: 1px solid #bee3f8;
        }
    }
}
