/**
 * Default Skin Stylesheet - Three Column Layout
 * Structure: Left branding | Center login | Right branding
 * Responsive: Stacks vertically on tablets, hides rightmost column on phones
 */

/* ============================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================= */
:root {
    /* Color palette */
    --umm-primary: #1e293b;
    --umm-accent: #2563eb;
    --umm-highlight: #3b82f6;
    --umm-background: #f8fafc;
    --umm-text-muted: #475569;
    --umm-text-light: #64748b;
    --umm-border: #e2e8f0;
    --umm-border-light: #e5e7eb;
    
    /* Typography */
    --umm-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --umm-line-height: 1.8;
    
    /* Input colors */
    --umm-input-text: #0f172a;
    --umm-input-placeholder: rgba(15, 23, 42, 0.6);
    --umm-input-bg: #f8fafc;
    --umm-input-bg-focus: #ffffff;
    
    /* Spacing */
    --umm-col-padding-desktop: 64px 48px;
    --umm-col-padding-tablet: 40px 24px;
    --umm-col-padding-mobile: 32px 20px;
    --umm-col-gap: 24px;
    
    /* Branding image sizes: unified dimensions for module and union logos */
    --umm-branding-img-size-desktop: 150px;
    --umm-branding-img-size-tablet: 90px;
    --umm-branding-img-size-mobile: 72px;
    
    /* Shadows */
    --umm-shadow-sm: 0 4px 12px rgba(37, 99, 235, 0.15);
    --umm-shadow-md: 0 8px 24px rgba(37, 99, 235, 0.12);
    --umm-shadow-lg: 0 20px 60px rgba(30, 41, 59, 0.12);
    --umm-shadow-btn: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ============================================================================
   BASE LAYOUT
   ========================================================================= */
.umm-website-frontpage-body,
.umm-frontpage-inner {
    font-family: var(--umm-font);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--umm-primary);
    line-height: var(--umm-line-height);
    padding: 0; 
}

/* ============================================================================
   HERO CONTAINER - THREE COLUMN LAYOUT
   ========================================================================= */
.umm-hero {
    display: flex;
    align-items: stretch;
    height: 100vh;
    width: 100vw;
    gap: var(--umm-col-gap);
    position: relative;
    overflow: hidden;
}

/* For the left-hero layout we want the three columns to sit flush with no gap
 * between them so gradient backgrounds meet exactly. Override the gap for
 * this specific layout rather than changing the global value.
 */
.umm-hero.umm-hero-left {
    --umm-col-gap: 0;
    gap: 0;
}

/* Decorative gradient overlay */
.umm-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.03) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================================================
   HERO COLUMNS - EQUAL WIDTH LAYOUT
   ========================================================================= */

/* Shared column styles */
.umm-hero-left-col,
.umm-hero-center-col,
.umm-hero-right-col {
    flex: 1 1 0%;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    min-width: 0;
    box-sizing: border-box;
}

/* Left column - Primary branding */
.umm-hero-left-col {
    padding: var(--umm-col-padding-desktop);
    padding-left: 0;
    margin-left: 0;
}

/* Center column - Login card with frosted glass effect */
.umm-hero-center-col {
    justify-content: center;
    padding: 48px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

/* ---------------------------------------------------------------------------
   SIDE COLUMNS - CONSOLIDATED ALIGNMENT & GUTTER RULES
   --------------------------------------------------------------------------- */

/* Left column: flush to outer edge, content anchored toward center */
.umm-hero-left-col {
    padding: 64px 18px 64px 0; /* top right bottom left */
    padding-left: 0; /* flush to left viewport edge */
    margin-left: 0;
}
.umm-hero-left-col .umm-branding {
    text-align: right;         /* headings and description face center */
    margin-left: auto;         /* push branding block toward center */
}
.umm-hero-left-col .umm-branding-logos {
    justify-content: flex-end; /* logos align to inner edge */
    margin-right: 0;
}

/* Right column: flush to outer edge, content anchored toward center */
.umm-hero-right-col {
    padding: 64px 0 64px 18px; /* top right bottom left */
    padding-right: 0;          /* ensure no right gutter */
    margin-right: 0;
}
.umm-hero-right-col .umm-branding {
    text-align: left;          /* headings and description face center */
    margin-right: auto;        /* push branding block toward center */
}
.umm-hero-right-col .umm-branding-logos {
    justify-content: flex-start; /* logos align to inner edge */
    margin-left: 0;
}

/* ============================================================================
   BRANDING SECTION
   ========================================================================= */
.umm-branding {
    max-width: 560px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo wrapper */
.umm-branding-logos {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

/* Base image styles */
.umm-branding-img {
    object-fit: contain;
    flex-shrink: 0;
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-origin: center center; /* ensure rotations pivot around center */
    will-change: transform, box-shadow;
    width: var(--umm-branding-img-size-desktop);
    height: var(--umm-branding-img-size-desktop);
}

/* Module icon modifier */
.umm-branding-img--module {
    width: var(--umm-branding-img-size-desktop);
    height: var(--umm-branding-img-size-desktop);
    padding: 6px;
    border-radius: 12px;
    box-shadow: var(--umm-shadow-sm);
}

.umm-branding-img--module:hover {
    transform: rotate(-5deg) scale(1.1);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

/* Union logo modifier */
.umm-branding-img--union {
    width: var(--umm-branding-img-size-desktop);
    height: var(--umm-branding-img-size-desktop);
    border-radius: 20px;
    box-shadow: var(--umm-shadow-md);
}

.umm-branding-img--union:hover {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.umm-hero-right-col .umm-branding-img--union:hover {
    transform: rotate(-5deg) scale(1.1);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

/* Typography */
.umm-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--umm-primary);
    letter-spacing: -0.02em;
}

.umm-subtitle {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--umm-accent);
}

.umm-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--umm-text-muted);
}

/* ============================================================================
   LOGIN CARD
   ========================================================================= */
.umm-login-card {
    width: 100%;
    max-width: 420px;
    padding: 32px;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    box-shadow: var(--umm-shadow-lg), 0 0 1px rgba(30, 41, 59, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box; 
}

.umm-login-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 70px rgba(30, 41, 59, 0.15);
}

    .umm-login-card h3 {
        font-size: 18px;
        font-weight: 600;
        margin: 0 0 16px 0;
        color: var(--umm-primary);
    }/* Form inputs */
.umm-input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 15px;
    background: var(--umm-input-bg);
    border: 1.5px solid var(--umm-border);
    border-radius: 10px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.umm-input:focus {
    outline: none;
    background: var(--umm-input-bg-focus);
    border-color: var(--umm-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Submit button */
.umm-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--umm-accent) 0%, var(--umm-highlight) 100%);
    border: none;
    border-radius: 10px;
    box-shadow: var(--umm-shadow-btn);
    cursor: pointer;
    transition: all 0.3s ease;
}

.umm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Help text */
.umm-login-help {
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    color: var(--umm-text-light);
}

/* Copyright */
.umm-login-copyright {
    margin-top: 20px;
    padding-top: 16px;
    font-size: 12px;
    text-align: center;
    color: #9ca3af;
    border-top: 1px solid var(--umm-border-light);
}

/* ============================================================================
   ADMIN PREVIEW (MOBILE EMULATION)
   ========================================================================= */
.umm-mobile-screen[data-layout="left-hero"] {
    background: var(--umm-background);
    color: var(--umm-primary);
}

.umm-mobile-screen[data-layout="left-hero"] .umm-mobile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px;
    background: white;
}

.umm-mobile-screen[data-layout="left-hero"] .umm-mobile-plugin-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--umm-primary);
}

.umm-mobile-screen[data-layout="left-hero"] .umm-mobile-description {
    margin-top: 6px;
    font-size: 14px;
    color: var(--umm-text-muted);
}

/* ============================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================= */

/* Tablet: Stack columns vertically */
@media (max-width: 780px) {
    .umm-hero {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    
    .umm-hero-left-col {
        padding: var(--umm-col-padding-tablet);
        padding-left: 0; /* remove left gutter on tablet/stacks */
    }
    
    .umm-hero-center-col {
        width: 100%;
        padding: 24px;
        flex: 1 0 auto;
        background: white;
        backdrop-filter: none;
    }
    
    .umm-hero-right-col:last-child {
        width: 100%;
        padding: 24px 0 24px 24px;
        padding-right: 0; /* explicit: no right gutter */
        order: 3;
    }
    
    .umm-branding {
        max-width: 100%;
    }
    
    .umm-title {
        font-size: 32px;
    }
    
    .umm-subtitle {
        font-size: 18px;
    }
    
    .umm-description {
        font-size: 15px;
    }
    
    .umm-branding-img--union {
        width: var(--umm-branding-img-size-tablet);
        height: var(--umm-branding-img-size-tablet);
    }
    
    .umm-login-card {
        max-width: 100%;
        padding: 28px 24px;
    }
}

/* Mobile: Hide rightmost column to reduce page length */
@media (max-width: 480px) {
    .umm-hero-left-col {
        padding: 16px 22px;
        min-height: auto;
    }
    
    .umm-hero-right-col:last-child {
        display: none;
        padding-right: 0;
    }

    /* Ensure the hero fills the mobile viewport and center the login card
     * vertically. Allow vertical scrolling if content exceeds viewport. This
     * makes the stacked layout feel intentional and uses the full screen.
     */
    .umm-hero {
        height: 100vh;          /* fill the viewport height */
        min-height: 100vh;      /* ensure minimum viewport height */
        justify-content: center; /* center all content vertically */
        overflow-y: auto;       /* allow scrolling if content exceeds viewport */
        box-sizing: border-box;
    }

    /* Ensure the center column (login card) is centered both horizontally
     * and vertically within the viewport on mobile.
     */
    .umm-hero-center-col {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 16px;
        flex: 0 0 auto;
        box-sizing: border-box;
    }
    
    .umm-title {
        font-size: 22px;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    
    .umm-subtitle {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .umm-login-card {
        padding: 20px 18px;
        max-width: 360px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Mobile-only: ensure username/password inputs and actions fit the card
     * and provide a slightly denser layout so the form doesn't overflow.
     */
    .umm-login-form {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .umm-login-form .umm-input {
        padding: 10px 12px;
        font-size: 14px;
        margin-bottom: 8px;
        border-radius: 8px;
        box-sizing: border-box;
    }

    .umm-login-actions {
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }

    .umm-login-actions .umm-btn {
        width: 100%;
        padding: 11px 12px;
        font-size: 14px;
        border-radius: 8px;
    }

    .umm-login-help {
        font-size: 12px;
        color: var(--umm-text-light);
        text-align: left;
        margin-top: 10px;
        line-height: 1.4;
    }
    
    /* Copyright */
    .umm-login-copyright {
        margin-top: 10px;
        padding-top: 10px;
        font-size: 11px;
        text-align: center;
        color: #9ca3af;
        border-top: 1px solid var(--umm-border-light);
    }
    
    /* Mobile image sizes */
    .umm-branding-img,
    .umm-branding-img--module,
    .umm-branding-img--union {
        width: var(--umm-branding-img-size-mobile);
        height: var(--umm-branding-img-size-mobile);
    }

    /* Mobile: place union logo and union name on the same line to save vertical
     * space. This handles both the skin partial markup (.umm-branding-logos)
     * and the fallback markup (.umm-logo).
     */
    .umm-hero-left-col .umm-branding {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        justify-items: center;
        gap: 0;
        margin-bottom: 0;
        width: 100%;
    }
    .umm-hero-left-col .umm-branding .umm-branding-logos {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-bottom: 0;
        flex: 0 0 auto;
        grid-column: 1;
        grid-row: 1;
    }
    .umm-hero-left-col .umm-branding .umm-branding-text {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        text-align: center;
        margin: 0;
        min-width: 0;
        flex: 0 0 auto;
        grid-column: 2;
        grid-row: 1;
        gap: 0;
    }
    .umm-hero-left-col .umm-branding .umm-title {
        margin: 0;
        font-size: 16px;
        white-space: normal;
        overflow: visible;
        word-break: break-word;
        overflow-wrap: anywhere;
        hyphens: auto;
        min-width: 0;
    }
    .umm-hero-left-col .umm-branding .umm-branding-logos img {
        margin-right: 0;
        width: 80px;
        height: 80px;
    }
    
    /* Show union description under logo+name line */
    .umm-hero-left-col .umm-branding .umm-description {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        margin: 0 !important;
        padding: 3% !important;
        font-size: 13px;
        line-height: 1.5;
        color: var(--umm-text-muted);
        text-align: center;
        grid-column: 1 / -1;
        grid-row: 2;
    }

    /* Mobile-only: hide union short name */
    .umm-hero-left-col .umm-subtitle {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        line-height: 0 !important;
    }

    /* Mobile: Show plugin branding below login form */
    .umm-hero-right-col {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 0 22px !important;
        order: 3;
        min-height: auto;
        background: transparent !important;
    }

    .umm-hero-right-col .umm-branding {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        justify-items: center;
        gap: 0;
        margin: 0;
        text-align: center;
        width: 100%;
        max-width: 100%;
    }

    .umm-hero-right-col .umm-branding .umm-branding-text {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 8px;
        text-align: center;
        margin: 0;
        min-width: 0;
        grid-column: 2;
        grid-row: 1;
    }

    .umm-hero-right-col .umm-branding .umm-branding-logos {
        display: flex;
        align-items: center;
        gap: 0;
        justify-content: center;
        margin-bottom: 0;
        grid-column: 1;
        grid-row: 1;
    }

    .umm-hero-right-col .umm-branding .umm-title {
        margin: 0;
        font-size: 14px;
        font-weight: 600;
        white-space: normal;
        overflow: visible;
        word-break: break-word;
        overflow-wrap: anywhere;
        hyphens: auto;
        min-width: 0;
    }

    .umm-hero-right-col .umm-branding .umm-branding-logos img {
        width: 80px;
        height: 80px;
        margin-right: 0;
        margin-bottom: 0;
    }

    /* Hide plugin subtitle on mobile, show only full name */
    .umm-hero-right-col .umm-subtitle {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .umm-hero-right-col .umm-description {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        font-size: 12px;
        line-height: 1.4;
        margin: 0 !important;
        padding: 3% !important;
        color: var(--umm-text-muted);
        grid-column: 1 / -1;
        grid-row: 2;
    }
}