/* =============================================================================
   GalileuLog P&G - OIDC Module Styles
   ============================================================================= */

/* --- Reset & Base --- */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-size: 13px;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Branded pages (login, access-denied, approval-pending) --- */
body.branded {
    background-size: cover;
    background-image: url(../imgs/bg.jpg);
}

body.branded .container {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

body.branded .login-form {
    width: 400px;
    opacity: 0.92;
    padding: 50px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 30px #0000001a;
}

body.branded .login-form img {
    display: block;
    margin: 0 auto 20px;
    max-width: 100%;
    height: auto;
}

body.branded .login-form > p {
    text-align: left;
    margin-bottom: 30px;
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

/* --- Login page specifics --- */
.wrap-input {
    width: 100%;
    border: 1px solid #e6e6e6;
    position: relative;
    background-color: #fff;
}

.wrap-input.username {
    padding-bottom: 2px;
}

.wrap-input.border-top-none {
    border-top: none;
}

.input {
    width: 100%;
    height: 68px;
    display: block;
    padding: 0 25px;
    color: #666;
    border: none;
    background-color: transparent;
    font-size: 15px;
    font-family: Roboto, sans-serif;
    line-height: 1.2;
    text-transform: none;
}

.input:focus {
    outline: none;
}

.input::placeholder {
    color: #999;
}

.submit-button {
    width: 100%;
    height: 60px;
    margin-top: 10px;
    cursor: pointer;
    font-weight: 700;
    color: #fff;
    border: 1px solid #4272d7;
    background-color: #4272d7;
    font-size: 15px;
    font-family: Roboto, sans-serif;
}

.submit-button:hover {
    background-color: #3565c8;
}

.submit-button.disabled {
    cursor: not-allowed;
    opacity: .4;
}

.action-link {
    float: right;
    opacity: 80%;
    margin-top: 10px;
    color: #007ad9;
    text-decoration: none;
    font-size: 13px;
}

.action-link:hover {
    text-decoration: underline;
}

.action-link.left {
    float: left;
}

.version-info {
    float: left;
    opacity: 50%;
    margin-top: 10px;
    font-size: 13px;
}

.error-message {
    background: #fff3cd;
    color: #856404;
    padding: 12px;
    border-radius: 3px;
    margin-bottom: 20px;
    font-size: 13px;
    border: 1px solid #ffeaa7;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 3px;
    margin-bottom: 20px;
    font-size: 13px;
    border: 1px solid #c3e6cb;
}

.divider {
    text-align: center;
    position: relative;
    clear: both;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e6e6e6;
}

.divider span {
    background: #fff;
    padding: 0 15px;
    color: #999;
    font-size: 13px;
    position: relative;
    z-index: 1;
}

.btn-oidc {
    width: 100%;
    height: 60px;
    margin-top: 10px;
    cursor: pointer;
    font-weight: 700;
    color: #4272d7;
    border: 2px solid #4272d7;
    background-color: #fff;
    font-size: 15px;
    font-family: Roboto, sans-serif;
}

/* --- Validação customizada de campos --- */
.wrap-input--error {
    border-color: #d9534f;
}

.field-error {
    display: block;
    color: #d9534f;
    font-size: 12px;
    padding: 5px 25px 6px;
    background-color: #fff8f8;
    border-top: 1px solid #f5c6c5;
}

.btn-oidc:hover {
    background-color: #f0f8ff;
}

.btn-oidc.disabled {
    cursor: not-allowed;
    opacity: .4;
}

.loading {
    display: none;
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 13px;
}

.loading.active {
    display: block;
}

.hidden {
    display: none !important;
}

/* --- Info box (access-denied, approval-pending, error) --- */
.info-box {
    margin: 24px 0;
    padding: 16px;
    color: #5f4b00;
    border: 1px solid #ffe08a;
    border-radius: 6px;
    background: #fff8dd;
    line-height: 1.6;
}

.info-box--error {
    color: #8b1a1a;
    border-color: #f5a5a5;
    background: #fde8e8;
}

.info-box .cache-hint {
    margin-top: 12px;
    color: #666;
    font-size: 12px;
}

/* --- Action buttons (access-denied, approval-pending) --- */
.actions-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

.button {
    width: 100%;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0;
    font-size: 15px;
    font-family: Roboto, sans-serif;
}

.button-primary {
    color: #fff;
    border: 1px solid #4272d7;
    background-color: #4272d7;
}

.button-primary:hover {
    background-color: #3565c8;
}

.button-secondary {
    color: #4272d7;
    border: 2px solid #4272d7;
    background-color: #fff;
}

.button-secondary:hover {
    background-color: #f0f8ff;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    body.branded .container {
        padding: 16px;
    }

    body.branded .login-form {
        width: 100%;
        padding: 32px 24px;
    }
}
