@import url(https://fonts.googleapis.com/css?family=Open+Sans);

/* Custom Bootstrap overrides and balloon input styling */
:root {
    --primary-color: #3483eb;
    --primary-dark: #123a56;
    --primary-medium: #377d6a;
    --primary-light: #7ab893;
    --bs-primary: #3483eb;
    --bs-primary-rgb: 52, 131, 235;
}

body {
    font-family: "Open Sans", sans-serif;
    font-weight: 300;
    background: #efefef;
}

/* Custom header styling */
header.bg-primary {
    background-color: var(--primary-color) !important;
    margin-left: calc(-1 * var(--bs-gutter-x, 1rem));
    margin-right: calc(-1 * var(--bs-gutter-x, 1rem));
    border-radius: 0;
}

header.bg-primary:before {
    position: absolute;
    content: "";
    display: block;
    top: 0;
    left: -5000px;
    height: 100%;
    width: 15000px;
    z-index: -1;
    background: inherit;
}

/* Balloon input wrapper - roi-main pattern */
.balloon-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.balloon {
    display: inline-block;
    width: 100%;
    padding: 10px 0 10px 15px;
    font-size: 17px;
    font-family: "Open Sans", sans;
    font-weight: 400;
    color: #123a56;
    background: #efefef;
    border: 0;
    border-radius: 3px;
    outline: 0;
    text-indent: 60px;
    transition: all 0.3s ease-in-out;
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
}

.balloon::-webkit-input-placeholder {
    color: #efefef;
    text-indent: 0;
    font-weight: 300;
}

.balloon-label {
    display: inline-block;
    position: absolute;
    top: 8px;
    left: 0;
    bottom: 8px;
    padding: 5px 15px;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(19, 74, 70, 0);
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
    background: rgba(122, 184, 147, 0);
    pointer-events: none;
}

.balloon-label:after {
    position: absolute;
    content: "";
    width: 0;
    height: 0;
    top: 100%;
    left: 50%;
    margin-left: -3px;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 3px solid rgba(122, 184, 147, 0);
    transition: all 0.3s ease-in-out;
}

.balloon:focus,
.balloon:active {
    color: var(--primary-color);
    text-indent: 0;
    background: #fff;
    border-color: var(--bs-primary);
}

.balloon:focus::-webkit-input-placeholder,
.balloon:active::-webkit-input-placeholder {
    color: #aaa;
}

.balloon:focus + .balloon-label,
.balloon:active + .balloon-label {
    color: #fff;
    text-shadow: 0 1px 0 rgba(19, 74, 70, 0.4);
    background: var(--primary-color);
    transform: translateY(-40px);
    font-size: 10px;
    top: 13px;
    bottom: 5px;
}

.balloon:focus + .balloon-label:after,
.balloon:active + .balloon-label:after {
    border-top: 4px solid var(--primary-light);
}

.balloon::selection {
    background-color: var(--primary-color);
    color: white;
}

/* Purchase item highlight animation */
.purchase-item.highlight-new {
    background: #e0f2fe !important;
    border-color: var(--primary-color) !important;
    animation: highlight-pulse 2s ease-in-out;
}

@keyframes highlight-pulse {
    0%, 100% {
        background: #e0f2fe;
    }
    50% {
        background: #bae6fd;
    }
}

/* Bootstrap customizations */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.nav-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.3);
    background-color: var(--primary-color) !important;
    padding: 0.5rem 0.5rem 0 0.5rem;
    border-radius: 3px 3px 0 0;
}

ul.nav-tabs .nav-link,
.nav-tabs button.nav-link {
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    transition: all 0.2s ease;
    opacity: 0.9;
}

ul.nav-tabs .nav-link:hover,
.nav-tabs button.nav-link:hover {
    color: #ffffff !important;
    opacity: 1;
    border-bottom-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

ul.nav-tabs .nav-link.active,
.nav-tabs button.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
    background: #ffffff !important;
    border-bottom: 2px solid #ffffff !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    opacity: 1;
}

.nav-tabs .nav-link:focus {
    outline: 2px solid rgba(52, 131, 235, 0.3);
    outline-offset: 2px;
}

.card {
    border-radius: 3px;
    border: 1px solid #dee2e6;
}

.card-body {
    color: #212529;
}

.text-muted {
    color: #6c757d !important;
}

/* Ensure good contrast for all text */
body {
    color: #212529;
}

h1, h2, h3, h4, h5, h6 {
    color: #212529;
    font-weight: 600;
}

/* Button readability */
.btn {
    font-weight: 500;
}

.btn-primary {
    color: #fff;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: #fff;
}

/* Mobile optimizations */
@media (max-width: 575.98px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    header.bg-primary {
        margin-left: calc(-1 * 0.75rem);
        margin-right: calc(-1 * 0.75rem);
    }
}
