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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 20px;
}

header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px; /* Prevents zoom on iOS */
    transition: border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input[type="radio"] {
    width: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    -webkit-appearance: radio;
    appearance: radio;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[type="radio"]:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border: none;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85em;
}

.form-group small a {
    color: #667eea;
    text-decoration: none;
}

.form-group small a:hover {
    text-decoration: underline;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: normal;
    min-height: 44px; /* Touch-friendly minimum size */
    flex: 1 1 auto;
    min-width: 120px;
}

.radio-label:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    accent-color: #667eea;
    -webkit-appearance: radio;
    appearance: radio;
    flex-shrink: 0;
}

.radio-label input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

.radio-label:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background-color: #f0f4ff;
}

.btn {
    padding: 16px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 10px;
    min-height: 48px; /* Touch-friendly button size */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: auto;
    min-width: 140px;
    max-width: 100%;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #28a745;
    color: white;
    width: auto;
    min-width: 140px;
    max-width: 100%;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-info {
    background: #17a2b8;
    color: white;
    width: auto;
    min-width: 140px;
    max-width: 100%;
}

.btn-info:hover:not(:disabled) {
    background: #138496;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading-section {
    text-align: center;
    padding: 40px;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loadingText {
    color: #666;
    font-size: 1.1em;
}

.story-section {
    margin-top: 30px;
}

.story-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.story-header {
    margin-bottom: 15px;
}

.story-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.story-header-info {
    flex: 1;
}

.story-header h3 {
    color: #667eea;
    font-size: 1.5em;
    margin-bottom: 5px;
}

.story-summary {
    color: #666;
    font-size: 1em;
}

.btn-toggle-story {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-toggle-story:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.btn-toggle-story:active {
    transform: scale(0.95);
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.8em;
}

.btn-toggle-story.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.story-description {
    margin-top: 15px;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
    overflow: hidden;
}

.story-description.collapsed {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    overflow: hidden;
}

.story-description-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.story-description-content table {
    margin: 15px 0;
    border-collapse: collapse;
    width: 100%;
}

.story-description-content table th,
.story-description-content table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.story-description-content table th {
    background-color: #f0f0f0;
    font-weight: bold;
}

.story-description pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-family: inherit;
    line-height: 1.6;
    max-height: none;
    overflow: visible;
    max-width: 100%;
}

.test-cases-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.story-header-separator {
    margin: 30px 0 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
}

.story-header-separator h3 {
    margin: 0;
    color: white;
    font-size: 1.2em;
}

.test-cases-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.test-cases-navigation {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.download-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* Allow wrapping if needed */
    align-items: stretch; /* Make all buttons same height */
}

.btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.download-buttons .btn {
    flex: 1 1 0; /* Equal flex basis, allow shrinking */
    min-width: 140px; /* Reduced minimum width */
    max-width: 100%; /* Prevent exceeding container */
    white-space: normal; /* Allow text wrapping if needed */
    word-wrap: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 12px; /* Reduced horizontal padding */
    font-size: 0.95em; /* Slightly smaller font */
}

.test-cases-header span {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1em;
}

.test-cases-list {
    display: grid;
    gap: 15px;
}

.test-case-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.test-case-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.test-case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

.test-case-title {
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.test-case-label {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
}

.test-case-label-editable {
    margin-left: 10px;
}

.test-case-label-select {
    padding: 5px 12px;
    border: 2px solid #667eea;
    border-radius: 20px;
    font-size: 0.85em;
    background: white;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
}

.test-case-label-select:hover {
    background: #f0f4ff;
}

.test-case-label-select:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.test-case-field {
    margin-bottom: 15px;
}

.test-case-field strong {
    color: #667eea;
    display: block;
    margin-bottom: 5px;
}

.test-case-field p, .test-case-field pre {
    color: #555;
    line-height: 1.6;
    white-space: pre-wrap;
}

.test-case-editable {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    color: #555;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s;
    background: white;
    margin-top: 5px;
    box-sizing: border-box;
}

.test-case-editable:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.test-case-editable:hover {
    border-color: #c0c0c0;
}

.error-section {
    margin-top: 20px;
}

.error-card {
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 12px;
    padding: 20px;
    color: #c00;
}

.error-card h3 {
    margin-bottom: 10px;
}

.error-card p {
    line-height: 1.6;
}

/* Responsive design - Tablet and below */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    .container {
        padding: 20px;
        border-radius: 12px;
        margin: 10px auto;
    }

    header {
        margin-bottom: 30px;
        padding-bottom: 15px;
    }

    header h1 {
        font-size: 1.8em;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 0.95em;
    }

    .form-section {
        margin-bottom: 25px;
    }

    .form-section h2 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }

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

    .radio-label {
        width: 100%;
        min-width: 100%;
    }

    .test-cases-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .test-cases-header span {
        font-size: 1em;
    }

    .download-buttons {
        width: 100%;
        flex-direction: column;
    }

    .btn-primary,
    .btn-success,
    .btn-info {
        width: 100%;
        margin-top: 0;
    }
    
    .download-buttons .btn {
        flex: 1 1 100%; /* Full width on mobile */
        min-width: 100%;
    }

    .story-card {
        padding: 15px;
    }

    .story-header h3 {
        font-size: 1.3em;
    }

    .test-case-card {
        padding: 15px;
    }

    .test-case-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .test-case-title {
        font-size: 1em;
    }

    .test-case-label {
        margin-top: 5px;
    }
}

/* Responsive design - Mobile phones */
@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .container {
        padding: 15px;
        border-radius: 0;
        margin: 0;
        min-height: 100vh;
        box-shadow: none;
    }

    header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    header h1 {
        font-size: 1.5em;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 0.9em;
    }

    .form-section h2 {
        font-size: 1.2em;
        margin-bottom: 12px;
    }

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

    .form-group label {
        font-size: 0.95em;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .form-group textarea {
        min-height: 80px;
    }

    .form-group small {
        font-size: 0.8em;
        margin-top: 4px;
    }

    .radio-label {
        padding: 10px 12px;
        font-size: 0.95em;
    }

    .btn {
        padding: 14px 20px;
        font-size: 0.95em;
    }

    .story-card {
        padding: 12px;
        border-radius: 8px;
    }

    .story-header h3 {
        font-size: 1.2em;
    }

    .story-summary {
        font-size: 0.9em;
    }

    .story-description {
        margin-top: 12px;
    }

    .story-description-content {
        padding: 12px;
        font-size: 0.9em;
        line-height: 1.5;
    }

    .story-description-content table {
        font-size: 0.8em;
    }

    .story-description pre {
        padding: 12px;
        font-size: 0.9em;
        line-height: 1.5;
    }

    .test-cases-section h2 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }

    .test-case-card {
        padding: 12px;
        border-radius: 8px;
    }

    .test-case-field {
        margin-bottom: 12px;
    }

    .test-case-field strong {
        font-size: 0.9em;
        margin-bottom: 4px;
    }

    .test-case-field p,
    .test-case-field pre {
        font-size: 0.9em;
        line-height: 1.5;
    }

    .test-case-editable {
        font-size: 0.9em;
        padding: 8px;
    }

    .test-case-label-select {
        font-size: 0.8em;
        padding: 4px 10px;
    }

    .story-header-separator {
        padding: 12px;
        margin: 20px 0 15px 0;
    }

    .story-header-separator h3 {
        font-size: 1.1em;
    }

    .error-card {
        padding: 15px;
    }

    .error-card h3 {
        font-size: 1.1em;
    }

    .error-card p {
        font-size: 0.9em;
    }

    .loading-section {
        padding: 30px 15px;
    }

    #loadingText {
        font-size: 1em;
    }

    .footer {
        margin-top: 30px;
        padding-top: 15px;
        font-size: 0.85em;
    }
}

/* Responsive design - Very small phones */
@media (max-width: 360px) {
    header h1 {
        font-size: 1.3em;
    }

    .container {
        padding: 12px;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px;
    }
    
    .form-group textarea {
        min-height: 70px;
    }

    .btn {
        padding: 12px 16px;
        font-size: 0.9em;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 5px;
    }

    .container {
        padding: 15px;
        max-height: 100vh;
        overflow-y: auto;
    }

    header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    header h1 {
        font-size: 1.5em;
    }
}

/* Footer styles */
.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.footer p {
    margin: 0;
    padding: 10px 0;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Coverage Analysis Section */
.coverage-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 3px solid #e0e0e0;
}

.coverage-section h2,
.coverage-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.coverage-lens {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.coverage-lens h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
}

.coverage-covered {
    margin-bottom: 20px;
}

.coverage-covered strong {
    color: #10b981;
    display: block;
    margin-bottom: 10px;
    font-size: 1.05em;
}

.coverage-missing {
    margin-bottom: 20px;
}

.coverage-missing strong {
    color: #ef4444;
    display: block;
    margin-bottom: 10px;
    font-size: 1.05em;
}

.coverage-list {
    list-style-type: disc;
    margin-left: 20px;
    padding-left: 20px;
}

.coverage-list li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #4a5568;
}

.coverage-loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-size: 1.1em;
}

.coverage-loading .loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

.coverage-percentage {
    margin: 20px 0;
}

.coverage-percentage-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 25px 30px;
    text-align: center;
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.coverage-percentage-display.multi-percentage {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.coverage-percentage-display .coverage-item {
    flex: 1;
}

.coverage-percentage-display .coverage-divider {
    width: 2px;
    height: 80px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 15px;
}

@media (max-width: 600px) {
    .coverage-percentage-display.multi-percentage {
        flex-direction: column;
    }
    .coverage-percentage-display .coverage-divider {
        width: 80%;
        height: 2px;
        margin: 20px auto;
    }
}

.coverage-percentage-display .percentage-label {
    font-size: 1.1em;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    opacity: 0.9;
}

.coverage-percentage-display .percentage-value {
    font-size: 3.5em;
    font-weight: 800;
    display: block;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.coverage-percentage-display .percentage-text {
    font-size: 1em;
    display: block;
    margin-top: 10px;
    opacity: 0.8;
    font-weight: 500;
}

.coverage-results {
    background: #f8f9fa;
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    line-height: 1.8;
    color: #333;
    max-height: none; /* Ensure no height limit */
    overflow: visible; /* Ensure all content is visible */
    word-wrap: break-word; /* Handle long words */
    overflow-wrap: break-word; /* Handle long words */
}

.coverage-results h1 {
    color: #667eea;
    font-size: 1.8em;
    margin: 20px 0 15px 0;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.coverage-results h2 {
    color: #764ba2;
    font-size: 1.5em;
    margin: 18px 0 12px 0;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.coverage-results h3 {
    color: #667eea;
    font-size: 1.2em;
    margin: 15px 0 10px 0;
}

.coverage-results p {
    margin: 12px 0;
    color: #444;
}

.coverage-results ul {
    margin: 15px 0 15px 20px;
    padding-left: 20px;
}

.coverage-results ol {
    margin: 15px 0 15px 20px;
    padding-left: 20px;
}

.coverage-results ol.test-steps-list {
    margin: 10px 0 10px 30px;
    padding-left: 25px;
}

.coverage-results ol.test-steps-nested-list {
    margin: 5px 0 5px 25px;
    padding-left: 20px;
    list-style-type: lower-alpha;
}

.coverage-results li {
    margin: 8px 0;
    color: #555;
    list-style-type: disc;
}

.coverage-results ol li {
    list-style-type: decimal;
    margin: 6px 0;
}

.coverage-results ol.test-steps-nested-list li {
    list-style-type: lower-alpha;
    margin: 4px 0;
}

.coverage-results .error-message {
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 8px;
    padding: 15px;
    color: #c33;
    margin: 20px 0;
}

.coverage-results .section-header {
    color: #667eea;
    font-size: 1.3em;
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.coverage-results .covered-section {
    background: #f0f9ff;
    border-left: none;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 15px 0;
}

.coverage-results .covered-header {
    color: #16a34a;
    font-size: 1.1em;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.coverage-results .missing-section {
    background: #fef2f2;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    outline: none !important;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 15px 0;
}

.coverage-results .covered-section {
    background: #f0f9ff;
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    outline: none !important;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 15px 0;
}

.coverage-results .missing-header {
    color: #dc2626;
    font-size: 1.1em;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.coverage-results hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 25px 0;
}

.coverage-results .missing-test-case {
    background-color: #ffffff !important;
    border: 0 !important;
    border-top: 1px solid #e2e8f0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    outline: 0 !important;
    border-radius: 0;
    padding: 15px;
    margin: 15px 0;
    box-shadow: none !important;
    position: relative;
}

.coverage-results .missing-test-case .test-case-id {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.coverage-results .missing-test-case .test-case-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
    font-size: 1.05em;
}

.coverage-results .missing-test-case .test-case-field {
    margin: 12px 0;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.coverage-results .missing-test-case .test-case-field:last-child {
    border-bottom: none;
}

.coverage-results .missing-test-case .test-case-field strong {
    color: #4a5568;
    display: inline-block;
    min-width: 120px;
    margin-right: 10px;
}

/* Ensure no side borders on any nested elements within coverage results */
.coverage-results .missing-test-case,
.coverage-results .missing-test-case *,
.coverage-results .missing-section,
.coverage-results .missing-section *,
.coverage-results .covered-section,
.coverage-results .covered-section * {
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.coverage-results .missing-test-case ul,
.coverage-results .missing-test-case ol,
.coverage-results .missing-test-case li,
.coverage-results .missing-section ul,
.coverage-results .missing-section ol,
.coverage-results .missing-section li,
.coverage-results .covered-section ul,
.coverage-results .covered-section ol,
.coverage-results .covered-section li {
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Ensure test case fields don't have side borders */
.coverage-results .missing-test-case .test-case-field,
.coverage-results .missing-test-case .test-case-field *,
.coverage-results .missing-section .test-case-field,
.coverage-results .missing-section .test-case-field *,
.coverage-results .covered-section .test-case-field,
.coverage-results .covered-section .test-case-field * {
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    outline: none !important;
}

/* Remove any potential side borders from ordered/unordered lists */
.coverage-results ol,
.coverage-results ul,
.coverage-results ol li,
.coverage-results ul li,
.coverage-results .coverage-results ol,
.coverage-results .coverage-results ul {
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    outline: none !important;
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        padding: 0;
    }

    .btn {
        display: none;
    }

    .form-section {
        display: none;
    }

    .footer {
        display: none;
    }
}

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

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 0;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    padding: 20px 30px;
    background-color: #667eea;
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5em;
}

.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-body p {
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.modal-body a {
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
    display: inline-block;
}

/* Two-Panel Test Cases Layout */
.test-cases-two-panel {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    height: calc(100vh - 400px);
    min-height: 600px;
}

.test-cases-left-panel {
    flex: 0 0 400px;
    display: flex;
    flex-direction: column;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}


.test-cases-list-panel {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.test-case-list-item {
    padding: 12px;
    margin-bottom: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.test-case-list-item:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.test-case-list-item.active {
    border-color: #667eea;
    background: #d6e0ff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.test-case-item-content {
    display: flex;
    align-items: flex-start;
}

.test-case-item-info {
    flex: 1;
    width: 100%;
}

.test-case-item-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.4;
}

.test-case-item-label {
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
}

.test-cases-right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.test-case-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.test-case-details-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 16px;
}

.test-case-details-header {
    padding: 20px;
    border-bottom: 2px solid #e0e0e0;
    background: #f8f9fa;
}

.test-case-details-title {
    flex: 1;
}

.test-case-details-title h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
    line-height: 1.4;
}

.test-case-label-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.test-case-details-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    padding: 8px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #666;
    position: relative;
}

.btn-icon:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f0f4ff;
}

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

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

.btn-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.test-case-details-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.test-case-details-section {
    margin-bottom: 25px;
}

.test-case-details-section label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.test-case-details-field {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.test-case-details-field:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.test-case-steps-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.test-case-step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.step-number {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
}

.test-case-step-input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
    min-height: 40px;
}

.test-case-step-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Test Cases Footer Navigation */
.test-cases-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 2px solid #e0e0e0;
}

.test-cases-footer .btn {
    flex: 1;
    max-width: 300px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Responsive adjustments for two-panel layout */
@media (max-width: 1024px) {
    .test-cases-two-panel {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    
    .test-cases-left-panel {
        flex: 1;
        max-height: 400px;
    }
    
    .test-cases-right-panel {
        flex: 1;
        min-height: 500px;
    }
    
    .test-cases-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .test-cases-footer .btn {
        width: 100%;
    }
}

