* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* WireMock brand colors */
    --wiremock-blue: #049DFF;
    --wiremock-dark-blue: #0E65C0;
    --wiremock-green: #71D1B3;
    --wiremock-yellow: #F0BC00;
    --wiremock-bg: #f7fafd;
    --wiremock-text: #2c3e50;
    --wiremock-light-gray: #f8f9fa;
    --wiremock-overlay: rgba(14, 101, 192, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--wiremock-text);
    background-color: white;
}

body.edit-mode {
    position: relative;
}

body.edit-mode::before {
    content: "Edit Mode";
    position: fixed;
    top: 25px;
    left: -35px;
    background-color: #049DFF;
    color: white;
    padding: 8px 50px;
    font-size: 16px;
    font-weight: bold;
    transform: rotate(-45deg);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    background-color: white;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
}

.logo-container {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    background-color: var(--wiremock-bg);
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem;
}

.header-row h1 {
    margin: 0;
    color: var(--wiremock-dark-blue);
    font-size: 1.8rem;
}

#wiremock-logo {
    margin: 0;
}

.content-grid {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

h1 {
    font-size: 2rem;
    color: var(--wiremock-blue);
    text-align: left;
}

.intro-text {
    width: 100%;
    text-align: left;
    color: var(--wiremock-text);
    margin-bottom: 0.8rem;
    line-height: 1.5;
    font-size: 1rem;
    font-weight: 500;
}

.intro-subtext {
    width: 100%;
    text-align: left;
    color: var(--wiremock-text);
    opacity: 0.85;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.01rem;
}

.intro-subtext:last-child {
    margin-bottom: 0;
}

h2 {
    color: var(--wiremock-dark-blue);
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--wiremock-blue);
    text-align: left;
}

h3 {
    color: var(--wiremock-text);
    margin: 1rem 0;
    font-size: 1.3rem;
}

.calculator-section, .results-section {
    background-color: var(--wiremock-bg);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.expand-btn:hover {
    background-color: rgba(4, 157, 255, 0.1);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
    background-color: white;
}

.input-group input:focus {
    outline: none;
    border-color: var(--wiremock-blue);
    box-shadow: 0 0 0 2px rgba(4, 157, 255, 0.2);
}

.result-row {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e7f0;
}

.result-label {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.result-unit {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

.result-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--wiremock-blue);
    margin-bottom: 0.5rem;
}

.result-description {
    font-size: 0.9rem;
    color: #666;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.metric {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.metric:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(4, 157, 255, 0.1);
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--wiremock-blue);
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Edit Mode Styles */
.edit-mode-link-container {
    text-align: center;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1.5rem;
}

.edit-mode-link {
    font-size: 0.8rem;
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.2s;
}

.edit-mode-link:hover {
    color: var(--wiremock-blue);
    text-decoration: underline;
}

.edit-mode-controls {
    position: absolute;
    top: 1rem;
    right: 2rem;
    display: none;
    gap: 0.5rem;
    z-index: 100;
}

.edit-mode-btn {
    background-color: var(--wiremock-blue);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.edit-mode-btn:hover {
    background-color: var(--wiremock-dark-blue);
}

#reset-values {
    background-color: var(--wiremock-green);
}

#reset-values:hover {
    background-color: #5cb99e;
}

.formula-editor {
    background-color: var(--wiremock-bg);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    display: none;
    height: 100%;
}

.editor-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.formula-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.formula-item {
    margin-bottom: 1.5rem;
}

.formula-item label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.formula-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.formula-input-group input {
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    transition: border-color 0.2s;
}

.formula-input-group input:focus {
    outline: none;
    border-color: var(--wiremock-blue);
    box-shadow: 0 0 0 2px rgba(4, 157, 255, 0.2);
}

.formula-hint {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.edit-mode .container {
    padding-top: 4rem;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    overflow-y: auto;
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: white;
    width: 100%;
    height: 100%;
    animation: modalFadeIn 0.3s;
    box-shadow: 0 0 30px rgba(4, 157, 255, 0.2);
    overflow-y: auto;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background-color: var(--wiremock-blue);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-title {
    color: white;
    margin: 0;
    font-size: 1.5rem;
}

.modal-header .logo-container {
    margin-bottom: 0;
    background-color: transparent;
    padding: 0;
    box-shadow: none;
}

.modal-header .header-row {
    margin-bottom: 0;
    justify-content: flex-start;
}

.modal-header img {
    filter: brightness(0) invert(1);
}

.modal-header h1 {
    margin-bottom: 0;
    font-size: 1.5rem;
    color: white;
    text-align: left;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.download-btn, .close-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s, transform 0.2s;
}

.download-btn {
    background-color: white;
    color: var(--wiremock-blue);
    font-weight: bold;
    padding: 0.75rem 1.5rem;
}

.download-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.download-btn svg path {
    fill: var(--wiremock-blue);
}

.close-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.close-btn svg path {
    fill: white;
}

.modal-body {
    padding: 2rem;
    background-color: var(--wiremock-overlay); /* Light blue overlay for contrast */
}

.results-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.pdf-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
    background-color: var(--wiremock-bg);
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.pdf-header .header-row {
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.pdf-header img {
    max-width: 120px;
    margin-bottom: 0;
}

.pdf-header h1 {
    font-size: 1.8rem;
    color: var(--wiremock-dark-blue);
    margin: 0;
}

.pdf-divider {
    width: 100%;
    border: 0;
    height: 2px;
    background-color: var(--wiremock-blue);
    margin: 2rem 0;
    opacity: 0.7;
}

.pdf-heading {
    font-size: 2rem;
    color: var(--wiremock-dark-blue);
    text-align: left;
    margin-top: 0;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--wiremock-blue);
}

.result-section {
    margin-bottom: 3rem;
}

.result-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.result-item {
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    transition: transform 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(4, 157, 255, 0.1);
}

.metrics-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.metric-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    transition: transform 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.metric-modal:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(4, 157, 255, 0.1);
}

.metric-modal .metric-value {
    font-size: 2rem;
    margin: 0.5rem 0;
}

.metric-modal .metric-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--wiremock-text);
    margin-bottom: 0.5rem;
}

/* PDF page break styles */
.pdf-page-break {
    height: 2px;
    background-color: #f0f0f0;
    margin: 4rem 0;
    page-break-after: always; /* For PDF generation */
    clear: both;
}

/* Inputs section for PDF */
.input-section {
    margin-top: 2rem;
}

.inputs-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.input-group-modal {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.input-group-modal h3 {
    color: var(--wiremock-dark-blue);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--wiremock-blue);
}

.input-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e7f0;
}

.input-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.input-label {
    font-weight: 500;
}

.input-value {
    font-weight: bold;
    color: var(--wiremock-blue);
}

@media (max-width: 992px) {
    .result-group {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-section, .results-section {
        margin-bottom: 2rem;
    }
    
    .result-group, .metrics-container, .inputs-container {
        grid-template-columns: 1fr;
    }
    
    .modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .modal-header .logo-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .formula-group {
        grid-template-columns: 1fr;
    }
    
    .edit-mode-controls {
        position: static;
        margin-bottom: 1rem;
        display: flex;
        justify-content: flex-end;
    }
}

.pdf-title-header {
    width: 100%;
    text-align: left;
    margin-bottom: 20px;
}

.pdf-title-header h1 {
    font-size: 28px;
    color: var(--wiremock-dark-blue);
    margin: 0;
    text-align: left;
}

.intro-text-container {
    width: 100%;
    padding: 1.8rem 2.5rem;
    background-color: var(--wiremock-overlay);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
}

.results-section h2:not(:first-child) {
    margin-top: 3rem;
}

.metrics-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e7f0;
}

.contact-section {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 1rem;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.contact-text {
    font-size: 1.2rem;
    color: var(--wiremock-text);
    line-height: 1.6;
    margin: 0;
}

.contact-link {
    color: var(--wiremock-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-link:hover {
    color: var(--wiremock-dark-blue);
    text-decoration: underline;
} 