/* ==========================================================================
   Intermedia Login Page — Professional Styles
   Matches the official Intermedia Cloud Communications login design
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    background-color: #00a4e4;
    color: #333;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   Header / Navigation Bar
   ========================================================================== */
.header {
    background-color: #fff;
    padding: 0 24px;
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 100;
    border-top: 4px solid transparent;
    border-image: linear-gradient(to right,
        #00a4e4 0%, #00a4e4 25%,
        #f7941d 25%, #f7941d 50%,
        #00a4e4 50%, #00a4e4 75%,
        #f7941d 75%, #f7941d 100%) 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0;
    user-select: none;
}

/* Intermedia color bars */
.logo-bars {
    display: flex;
    gap: 2px;
    margin-right: 8px;
    height: 22px;
    align-items: flex-end;
}

.logo-bars span {
    display: inline-block;
    width: 5px;
    border-radius: 1px;
}

.logo-bars .bar-1 { background: #00a4e4; height: 14px; }
.logo-bars .bar-2 { background: #00a4e4; height: 18px; }
.logo-bars .bar-3 { background: #f7941d; height: 22px; }
.logo-bars .bar-4 { background: #f7941d; height: 16px; }

.logo-text {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1.5px;
    color: #333;
    line-height: 1;
}

.logo-subtitle {
    font-size: 8.5px;
    letter-spacing: 0.8px;
    color: #777;
    text-transform: uppercase;
    margin-top: 1px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: #00a4e4;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #0087c1;
}

/* ==========================================================================
   Main Container
   ========================================================================== */
.container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    flex: 1;
}

/* ==========================================================================
   Welcome Message
   ========================================================================== */
.welcome-message {
    text-align: center;
    color: #fff;
    font-size: 34px;
    font-weight: 300;
    margin-bottom: 28px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    letter-spacing: -0.3px;
}

/* ==========================================================================
   Service Tabs (For users / For admins / Voice services)
   ========================================================================== */
.service-tabs {
    display: flex;
    background-color: #e8e8e8;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
}

.tab {
    flex: 1;
    padding: 16px 8px 14px;
    text-align: center;
    cursor: pointer;
    background-color: #e8e8e8;
    border-right: 1px solid #d5d5d5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.2s ease;
    position: relative;
    font-size: 13px;
    color: #555;
}

.tab:last-child {
    border-right: none;
}

.tab:hover {
    background-color: #ddd;
}

.tab.active {
    background-color: #f5f5f5;
    color: #333;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #00a4e4;
}

.tab-icon {
    font-size: 28px;
    line-height: 1;
    opacity: 0.85;
}

.tab-icon img, .tab-icon svg {
    width: 36px;
    height: 36px;
}

.tab-label {
    font-size: 12.5px;
    font-weight: 500;
}

/* ==========================================================================
   Service Toggle Buttons (Webmail / My Services)
   ========================================================================== */
.service-buttons {
    display: flex;
    margin: 0;
    border-left: 1px solid #d5d5d5;
    border-right: 1px solid #d5d5d5;
    overflow: hidden;
}

.service-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: none;
    outline: none;
    user-select: none;
}

.webmail-btn {
    background-color: #2c6f9e;
    color: #fff;
}

.webmail-btn:hover {
    background-color: #245d87;
}

.webmail-btn .btn-icon {
    font-size: 16px;
}

.my-services-btn {
    background-color: #e0e0e0;
    color: #555;
}

.my-services-btn:hover {
    background-color: #d0d0d0;
}

.info-icon {
    font-size: 13px;
    opacity: 0.6;
    margin-left: 2px;
}

/* ==========================================================================
   Login Form Card
   ========================================================================== */
.login-form {
    background-color: #fff;
    padding: 28px 28px 32px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10),
                0 1px 4px rgba(0, 0, 0, 0.06);
}

.form-group {
    margin-bottom: 16px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #c8c8c8;
    border-radius: 3px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input::placeholder {
    color: #999;
    font-weight: 400;
}

.form-group input:focus {
    outline: none;
    border-color: #00a4e4;
    box-shadow: 0 0 0 2px rgba(0, 164, 228, 0.15);
}

/* Remember / Forgot row */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    font-size: 13.5px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #00a4e4;
    cursor: pointer;
}

.forgot-password {
    color: #00a4e4;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #0087c1;
    text-decoration: underline;
}

/* Login Button */
.login-btn {
    width: 70%;
    margin: 0 auto;
    display: block;
    background-color: #8db63c;
    color: #fff;
    padding: 13px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
}

.login-btn:hover {
    background-color: #7aa52e;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.login-btn:active {
    background-color: #6d9427;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    transform: translateY(1px);
}

/* ==========================================================================
   Other Services Section
   ========================================================================== */
.other-services {
    margin-top: 32px;
    text-align: center;
}

.other-services-title {
    margin-bottom: 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

.services-grid {
    display: flex;
    justify-content: center;
    gap: 36px;
    flex-wrap: wrap;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    border-radius: 6px;
}

.service-item:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.service-item:hover .service-icon {
    background: rgba(255, 255, 255, 0.25);
}

.service-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-weight: 500;
}

.info-icon-small {
    font-size: 11px;
    opacity: 0.6;
    margin-left: 2px;
}

/* ==========================================================================
   Feedback Footer
   ========================================================================== */
.footer {
    position: fixed;
    bottom: 0;
    right: 0;
    padding: 10px 22px;
    background-color: #f7941d;
    color: #fff;
    border-radius: 6px 0 0 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
    box-shadow: -2px -2px 6px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.footer:hover {
    background-color: #e5850f;
}

/* ==========================================================================
   reCAPTCHA
   ========================================================================== */
.g-recaptcha {
    margin: 18px 0 22px;
    display: flex;
    justify-content: center;
}

.g-recaptcha > div {
    transform-origin: center;
}

/* ==========================================================================
   Error & Lockout Messages
   ========================================================================== */
.error-message {
    color: #c0392b;
    background-color: #fdecea;
    padding: 14px 18px;
    margin: 16px 0;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    border-left: 4px solid #e74c3c;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.error-message small {
    color: #a93226;
    font-size: 12.5px;
    display: block;
    margin-top: 4px;
}

.lockout-message {
    color: #856404;
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    border-color: #ffc107;
    padding: 20px 18px;
    font-size: 14.5px;
    line-height: 1.7;
}

.lockout-message strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 520px) {
    .container {
        max-width: 100%;
        padding: 24px 16px 48px;
    }

    .welcome-message {
        font-size: 26px;
        margin-bottom: 20px;
    }

    .login-form {
        padding: 22px 20px 26px;
    }

    .login-btn {
        width: 100%;
    }

    .header {
        padding: 0 16px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-links a {
        font-size: 11.5px;
    }

    .service-tabs {
        flex-direction: column;
        border-radius: 4px 4px 0 0;
    }

    .tab {
        flex-direction: row;
        gap: 10px;
        padding: 12px 16px;
        border-right: none;
        border-bottom: 1px solid #d5d5d5;
    }

    .tab:last-child {
        border-bottom: none;
    }

    .tab.active::after {
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        width: 3px;
        height: auto;
    }

    .tab-icon {
        font-size: 22px;
    }

    .service-buttons {
        flex-direction: column;
        border-left: none;
        border-right: none;
    }

    .service-btn {
        border-radius: 0;
    }

    .services-grid {
        gap: 20px;
    }

    .footer {
        position: fixed;
        bottom: 0;
        right: 0;
        border-radius: 6px 0 0 0;
    }
}

@media (max-width: 360px) {
    .logo-text {
        font-size: 13px;
    }

    .logo-subtitle {
        display: none;
    }

    .welcome-message {
        font-size: 22px;
    }
}

/* ==========================================================================
   Utilities & Animation
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-form,
.service-tabs,
.service-buttons,
.other-services {
    animation: fadeIn 0.35s ease-out;
}

/* Focus ring for accessibility */
*:focus-visible {
    outline: 2px solid #00a4e4;
    outline-offset: 2px;
}

/* Scrollbar styling (Webkit) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
