/* ENGIE Pro France - Main Application Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

html, body {
    font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    padding: 0;
    margin: 0;
    background-color: #006EB6;
    -webkit-tap-highlight-color: transparent;
    font-size: var(--fontsize-tablet) !important;
    overflow: hidden;
    height: 100%;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #006EB6;
}

a:hover {
    color: #005A94;
}

.btn-primary {
    color: #fff;
    background-color: #006EB6;
    border-color: #005A94;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #005A94;
    border-color: #004775;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #22C55E;
}

.invalid {
    outline: 1px solid #EF4444;
}

.validation-message {
    color: #EF4444;
    font-size: 0.8rem;
    border-radius: unset;
    border: unset;
    margin-top: 4px;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIH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kyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #EF4444;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.status-bar-safe-area {
    display: none;
}

@supports (-webkit-touch-callout: none) {
    .status-bar-safe-area {
        display: flex;
        position: sticky;
        top: 0;
        height: env(safe-area-inset-top);
        background-color: #f7f7f7;
        width: 100%;
        z-index: 1;
    }

    .flex-column, .navbar-brand {
        padding-left: env(safe-area-inset-left);
    }
}

/* Progress Bar - ENGIE Blue Gradient */
.progressBar {
    width: 100vw;
    display: block;
    height: 6px;
    flex-shrink: 0;
}

progress {
    -webkit-appearance: none;
}

::-webkit-progress-bar {
    background-color: #C7E0F0;
}

::-webkit-progress-value {
    background: linear-gradient(90deg, #006EB6 0%, #4398CB 100%);
}

/* Header Section */
.EngiePro-header {
    height: 15%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #006EB6 0%, #1E85C1 100%);
}

.EngiePro-header-container {
    display: flex;
    flex-flow: column;
    margin-left: var(--gutter);
    justify-content: center;
    height: 100%;
}

.EngiePro-header-title {
    font-weight: 700;
    color: #FFFFFF;
    font-size: xx-large;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.EngiePro-header-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: x-large;
    font-weight: 400;
}

/* Content Area */
.EngiePro-content {
    border-radius: 24px 24px 0px 0px;
    background-color: #ffffff;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0, 110, 182, 0.15);
}

.EngiePro-content-contract-entry {
    margin: var(--gutter) var(--gutter) 0 var(--gutter);
    gap: var(--gutter);
}

.EngiePro-content-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--gutter);
    margin-top: auto;
    padding: 16px 0;
}

form {
    height: 100%;
    position: relative;
    padding-bottom: 10%;
}

.EngiePro-content-flex-flow {
    flex-flow: column;
}

.EngiePro-content-flex-flow-row {
    flex-flow: row;
}

.e-radio-wrapper {
    margin: 0.3%;
}

.EngiePro-capture-content-wrapper {
    margin-bottom: calc(var(--gutter)/2);
}

.EngiePro-capture-content {
    display: flex;
    flex-flow: column;
    width: 100%;
}

.EngiePro-capture-content form {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 20em);
}

.EngiePro-capture-content-title {
    font-weight: 600;
    margin-bottom: calc(var(--gutter)/2);
    width: -webkit-fill-available;
    color: #1F2937;
}

.EngiePro-capture-content-content {
    display: flex;
    gap: calc(var(--gutter)/2);
}

.EngiePro-capture-content-flexspacebetween {
    display: flex;
    justify-content: space-between;
}

/* Group Title - ENGIE Blue */
.EngiePro-group-title {
    margin: calc(var(--gutter)/2) 0% calc(var(--gutter)/2) 0%;
    color: #006EB6;
    font-weight: 600;
    font-size: 1.1em;
    border-bottom: 2px solid #C7E0F0;
    padding-bottom: 8px;
}

.EngiePro-group-title:first-child {
    margin: 0% 0% calc(var(--gutter)/2) 0%;
}

.checkboxsyncfusionoverride {
    max-width: 95%;
    display: flex;
}

.e-listbox-container {
    border: unset !important;
}

/* Button Styles - ENGIE Theme */
.e-btn, .e-css.e-btn {
    -webkit-tap-highlight-color: transparent !important;
    background: #ffffff !important;
    border-color: #E8EBED !important;
    color: #1F2937 !important;
    transition: all 0.2s ease !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
}

.e-btn:hover, .e-css.e-btn:hover {
    border-color: #006EB6 !important;
    color: #006EB6 !important;
}

.e-btn:focus, .e-css.e-btn:focus {
    background: #ffffff;
    border-color: #006EB6;
    color: #006EB6;
    outline: unset;
    outline-offset: 0;
    box-shadow: 0 0 0 3px rgba(0, 110, 182, 0.2) !important;
}

.e-btn.e-upload-browse-btn {
    background: #006EB6 !important;
    color: #FFFFFF !important;
    border-color: #006EB6 !important;
}

.e-btn.e-upload-browse-btn:hover {
    background: #005A94 !important;
    color: #FFFFFF !important;
    border-color: #005A94 !important;
}

.e-dropdown-btn:focus, .e-dropdown-btn.e-btn:focus {
    box-shadow: 0 0 0 3px rgba(0, 110, 182, 0.2);
}

.text-optional {
    font-size: calc(var(--fontsize-tablet)/1.5);
    font-weight: unset;
    color: #6B7280;
}

/* Loader - ENGIE Colors */
.loader {
    width: 10.2rem;
    height: 10.2rem;
    margin-top: calc(-1 * 10.2rem);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    border: max(3px, calc(3.2rem)/12) solid;
    border-color: #006EB6 #006EB6 transparent transparent;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

.loader::after,
.loader::before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    border: 3px solid;
    border-color: transparent transparent #4398CB #4398CB;
    width: 8.2rem;
    height: 8.2rem;
    border-radius: 50%;
    box-sizing: border-box;
    animation: rotationBack 0.5s linear infinite;
    transform-origin: center center;
}

.loader::before {
    width: 9.2rem;
    height: 9.2rem;
    border-color: #C7E0F0 #C7E0F0 transparent transparent;
    animation: rotation 1.5s linear infinite;
}

/* Small Loader - for Auth checking */
.loader-small {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    border: 3px solid;
    border-color: #006EB6 #006EB6 transparent transparent;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

.loader-small::after,
.loader-small::before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    border: 2px solid;
    border-color: transparent transparent #4398CB #4398CB;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    animation: rotationBack 0.5s linear infinite;
    transform-origin: center center;
}

.loader-small::before {
    width: 3.6rem;
    height: 3.6rem;
    border-color: #C7E0F0 #C7E0F0 transparent transparent;
    animation: rotation 1.5s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotationBack {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}

.text-uppercase {
    text-transform: uppercase;
}

.primary-residence-wrapper {
    padding: 12px 16px;
    width: 100%;
    background-color: rgba(0, 110, 182, 0.08) !important;
    border-radius: 12px;
    border: 1px solid #C7E0F0;
}

.primary-residence {
    width: 100%;
}

.chat-toggle-button {
    background-color: #006EB6 !important;
}

.chat-header {
    background-color: #006EB6 !important;
}

/* ENGIE Logo Container */
.engie-logo {
    height: 40px;
    width: auto;
}

.engie-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.engie-logo-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: #006EB6;
    letter-spacing: -0.5px;
}

/* MudBlazor Overrides for ENGIE Theme */
.mud-theme-primary {
    background-color: #006EB6 !important;
}

.mud-primary-text {
    color: #006EB6 !important;
}

/* Card enhancements */
.mud-card {
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 110, 182, 0.08) !important;
}

/* Dialog enhancements */
.e-dialog {
    border-radius: 16px !important;
}

.e-dlg-header-content {
    background: linear-gradient(135deg, #006EB6 0%, #1E85C1 100%) !important;
    color: white !important;
    border-radius: 16px 16px 0 0 !important;
}

.e-dlg-header {
    color: white !important;
}

/* Toast notifications */
.e-toast {
    border-radius: 12px !important;
}

.e-toast.e-toast-success {
    background-color: #22C55E !important;
}

.e-toast.e-toast-warning {
    background-color: #F59E0B !important;
}

.e-toast.e-toast-danger {
    background-color: #EF4444 !important;
}

.e-toast.e-toast-info {
    background-color: #006EB6 !important;
}
