body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.generator-container {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.header {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    padding: 24px;
    text-align: center;
}

.header h1 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.language-toggle {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    gap: 10px;
}

.flag-button {
    background: none;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.flag-button.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.flag-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.content-wrapper {
    display: flex;
    min-height: 600px;
}

.form-panel {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: 70vh;
}

.preview-panel {
    flex: 1;
    background: #f9fafb;
    border-left: 1px solid #e5e7eb;
    padding: 20px;
    overflow-y: auto;
    max-height: 70vh;
}

.tab-navigation {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e5e7eb;
    padding: 0 20px;
    background: white;
}

.tab-button {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-button.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.label-with-help {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.label-with-help label {
    font-weight: 600;
    color: #374151;
}

.help-icon {
    color: #6b7280;
    cursor: help;
    position: relative;
}

.tooltip {
    position: absolute;
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    margin-bottom: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 10;
}

.help-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    margin-top: 4px;
}

.warning-text {
    color: #dc2626;
    font-size: 13px;
    margin-top: 4px;
}

.moderate-text {
    color: #d97706;
    font-size: 13px;
    margin-top: 4px;
}

.clause-included-info {
    color: #15803d;
    font-size: 13px;
    margin-left: 24px;
    margin-bottom: 16px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.checkbox-warning {
    color: #dc2626;
    font-size: 13px;
    margin-left: 24px;
    margin-bottom: 16px;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    background: white;
}

.nav-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prev-button {
    background: #f3f4f6;
    color: #374151;
}

.next-button {
    background: #2563eb;
    color: white;
}

.nav-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Custom buttons */
.copy-button {
    position: relative;
}

.copy-button:hover {
    background-color: #4338ca !important;
}

.copy-button:active {
    transform: translateY(1px);
}

/* Date format display */
.date-format-display {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    font-style: italic;
}

/* Dual column preview styles */
.dual-column-preview {
    font-family: Calibri, 'Times New Roman', serif;
    font-size: 11pt;
    line-height: 1.5;
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.preview-table tr {
    width: 100%;
    display: table;
    table-layout: fixed;
}

.preview-table td {
    padding: 10px;
    vertical-align: top;
    word-wrap: break-word;
    white-space: pre-wrap;
    position: relative;
    z-index: 1;
}

.english-column {
    width: 48%;
    text-align: left;
}

.separator {
    width: 4%;
    border-left: 1px solid #ccc;
}

.spanish-column {
    width: 48%;
    text-align: left;
}

.title-row td {
    font-weight: bold;
    padding-top: 20px;
}

.signature-row td {
    font-weight: bold;
    text-transform: uppercase;
}

.title-row:first-child td {
    padding-top: 0;
    text-align: center;
    font-size: 14pt;
}

.highlighted-text {
    background-color: #fff9c4;
    position: relative;
    z-index: 1;
    animation: highlight 2s;
}

@keyframes highlight {
    0% { background-color: #ffeb3b; }
    100% { background-color: #fff9c4; }
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.summary-item {
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
}

.summary-item.safe {
    background: #dcfce7;
    color: #15803d;
}

.summary-item.risky {
    background: #fee2e2;
    color: #dc2626;
}

.summary-item.moderate {
    background: #fef3c7;
    color: #d97706;
}

.summary-label {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.preview-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1f2937;
}

/* Risk Analysis Styles */
.risk-section {
    margin-bottom: 20px;
    border-radius: 6px;
    padding: 12px 16px;
}

.risk-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

.risk-section.risky {
    background-color: rgba(254, 226, 226, 0.5);
    border-left: 4px solid #dc2626;
}

.risk-section.moderate {
    background-color: rgba(254, 243, 199, 0.5);
    border-left: 4px solid #d97706;
}

.risk-section.safe {
    background-color: rgba(220, 252, 231, 0.5);
    border-left: 4px solid #15803d;
}

.risk-section ul {
    margin: 0;
    padding-left: 20px;
}

.risk-section li {
    margin-bottom: 6px;
}