/* 
 * Bluegate Calculators - Modern W/M Styles
 */

.bg-modern-calc.bg-wm-calc {
    font-family: var(--e-global-typography-primary-font-family), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1f2937;
    max-width: 800px;
    margin: 2rem auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    line-height: 1.5;
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.bg-modern-calc.bg-wm-calc *,
.bg-modern-calc.bg-wm-calc *::before,
.bg-modern-calc.bg-wm-calc *::after {
    box-sizing: border-box;
}

/* Header */
.bg-modern-calc .bg-mc-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f3f4f6;
    margin: 0;
}

.bg-modern-calc .bg-mc-icon {
    color: #3b82f6;
    width: 28px;
    height: 28px;
}

.bg-modern-calc .bg-mc-header h3 {
    margin: 0;
    padding: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    border: none;
    line-height: 1.2;
}

.bg-modern-calc .bg-mc-intro {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid #3b82f6;
}

.bg-modern-calc .bg-mc-intro p {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.bg-modern-calc .bg-mc-intro ul {
    margin-top: 0;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
}

/* Body and Layout */
.bg-modern-calc .bg-mc-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bg-modern-calc .bg-mc-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 600px) {
    .bg-modern-calc .bg-mc-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Field Groups and Inputs */
.bg-modern-calc .bg-mc-field-group {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 56px;
    margin: 0;
    padding: 0;
}

.bg-modern-calc input.bg-mc-input {
    width: 100%;
    height: 56px;
    border: 1px solid #d1d5db !important;
    background-color: #f9fafb !important;
    padding: 1.5rem 1rem 0.5rem 1rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #111827 !important;
    font-family: inherit !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    border-radius: 0.5rem !important;
    margin: 0 !important;
    line-height: normal !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease;
}

.bg-modern-calc input.bg-mc-input:focus {
    border-color: #3b82f6 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.bg-modern-calc label.bg-mc-label-floating {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
    padding: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

/* Floating label trigger */
.bg-modern-calc .bg-mc-input:focus ~ .bg-mc-label-floating,
.bg-modern-calc .bg-mc-input:not(:placeholder-shown) ~ .bg-mc-label-floating {
    top: 0.75rem;
    transform: translateY(0);
    font-size: 0.75rem;
    font-weight: 600;
    color: #3b82f6;
}

.bg-modern-calc .bg-mc-input:not(:focus):not(:placeholder-shown) ~ .bg-mc-label-floating {
    color: #6b7280;
}

.bg-modern-calc .bg-mc-has-suffix {
    padding-right: 3rem !important;
}

.bg-modern-calc .bg-mc-suffix {
    position: absolute;
    right: 1rem;
    bottom: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    pointer-events: none;
    margin: 0;
    z-index: 2;
}

/* Buttons */
.bg-modern-calc .bg-mc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
}

.bg-modern-calc .bg-mc-btn-primary {
    background-color: #3b82f6;
    color: #ffffff;
    width: 100%;
}

.bg-modern-calc .bg-mc-btn-primary:hover {
    background-color: #2563eb;
}

.bg-modern-calc .bg-mc-btn-secondary {
    background-color: #f59e0b;
    color: #ffffff;
}

.bg-modern-calc .bg-mc-btn-secondary:hover {
    background-color: #d97706;
}

.bg-modern-calc .bg-mc-btn-outline {
    background-color: transparent;
    color: #3b82f6;
    border-color: #3b82f6;
}

.bg-modern-calc .bg-mc-btn-outline:hover {
    background-color: #eff6ff;
}

.bg-modern-calc .bg-mc-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (min-width: 600px) {
    .bg-modern-calc .bg-mc-cta {
        flex-direction: row;
        justify-content: center;
    }
}

/* Results Section */
.bg-modern-calc .bg-mc-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f3f4f6;
    margin: 0;
}

@media (min-width: 600px) {
    .bg-modern-calc .bg-mc-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

.bg-modern-calc .bg-mc-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 0.75rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0;
}

.bg-modern-calc .bg-mc-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #4b5563;
    margin: 0;
    flex-shrink: 0;
}

.bg-modern-calc .bg-mc-highlight {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.bg-modern-calc .bg-mc-highlight .bg-mc-result-icon {
    background: #dbeafe;
    color: #2563eb;
}

.bg-modern-calc .bg-mc-result-content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin: 0;
}

.bg-modern-calc .bg-mc-result-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    line-height: 1.2;
}

.bg-modern-calc .bg-mc-highlight .bg-mc-result-title {
    color: #1e40af;
}

.bg-modern-calc .bg-mc-result-val {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin: 0;
}

.bg-modern-calc .bg-mc-highlight .bg-mc-result-val {
    color: #1d4ed8;
}

.bg-modern-calc .bg-mc-result-val small {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    margin: 0;
}

.bg-modern-calc .bg-mc-highlight .bg-mc-result-val small {
    color: #3b82f6;
}
