body {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    margin: 0;
    padding: 0;
}

/* Stance-based conditional messages for guideline page */
.prohibited-message, .allowed-message {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
}

.prohibited-message {
    border-color: #dc3545;
    background: #f8d7da;
}

.prohibited-message p {
    margin: 0 0 10px 0;
    color: #721c24;
    font-size: 16px;
    line-height: 1.5;
}

.prohibited-message p:last-child {
    margin-bottom: 0;
    font-size: 14px;
    color: #856404;
}

.allowed-message {
    border-color: #28a745;
    background: #d4edda;
}

.allowed-message p {
    margin: 0 0 10px 0;
    color: #155724;
    font-size: 16px;
    line-height: 1.5;
}

.allowed-message p:last-child {
    margin-bottom: 0;
    font-size: 14px;
    color: #0c5460;
}

.prohibited-message strong, .allowed-message strong {
    font-weight: 700;
}

/* Only apply flex layout to home page */
.home-page body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.header {
    width: 100%;
    border-bottom: 1px solid #eee;
}

.title {
    margin-left: 45px;
    margin-top: 20px;
    margin-bottom: 25px;
    width: 100px;
    font-family: 'Albert Sans', sans-serif;
    background-color: white;
    color: black;
    text-align: left;
    font-size: 9px;
}

h1 {
    font-weight: normal;
    margin: 0;
}

/* Page wrapper */
.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Override for pages with navigation */
.guideline-page .page-wrapper {
    max-width: none;
    margin: 0;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

/* Guideline header */
.guideline-header {
    text-align: center;
    margin-bottom: 20px;
    flex-shrink: 0;
    min-height: 60px;
}

.guideline-header h2 {
    font-size: 27px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    margin-top: 0px;
}

.guideline-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.guideline-download-section {
    position: relative;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.download-guideline-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    background-color: rgb(0, 106, 170);
    color: white;
    border: none;
    cursor: pointer;
}

.download-guideline-btn:hover {
    background-color: rgb(18, 39, 70);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.download-icon {
    font-size: 16px;
}

/* Panels container */
.panels-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    flex: 1;
    min-height: 200px;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
}

/* Apply button in left panel header */
.left-panel-header .apply-btn {
    margin-left: 10px;
    background-color: rgb(12,84,134);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.left-panel-header .apply-btn:hover {
    background-color: rgb(18, 39, 70);
    transform: translateY(-1px);
}

/* Arrow button styling */
.arrow-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgb(0, 106, 170);
    background: white;
    color: rgb(0, 106, 170);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.arrow-btn:hover {
    background: rgb(0, 106, 170);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

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

.arrow-btn .arrow {
    transition: transform 0.3s ease;
}

.arrow-btn:hover .arrow {
    transform: translateX(3px);
}

/* Left panel */
.left-panel {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 200px;
    max-height: 100%;
    overflow: hidden;
    overflow-x: hidden;
}

.left-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.left-panel h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Component sections */
.component-section {
    margin-bottom: 25px;
}

.component-section:last-child {
    margin-bottom: 0;
}

.component-section label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

.component-section textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
}

.component-section textarea:focus {
    outline: none;
    border-color: rgb(0, 106, 170);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.component-section textarea::placeholder {
    color: #999;
}

/* Form container for scrolling */
.left-panel form {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px; /* Space for scrollbar */
    min-height: 0; /* Allow flex item to shrink */
}

/* Custom scrollbar for the form */
.left-panel form::-webkit-scrollbar {
    width: 8px;
}

.left-panel form::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.left-panel form::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.left-panel form::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Subtasks Grid */
.subtasks-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 15px;
}

.subtask-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.subtask-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    gap: 10px;
}

.subtask-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    flex: 1;
    min-width: 0;
    margin-right: 10px;
}

.subtask-title textarea {
    padding: 8px 10px;
    box-sizing: border-box;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    resize: vertical;
    min-height: 40px;
    width: 100%;
    transition: background-color 0.3s ease;
}

.subtask-actions {
    display: flex;
    gap: 5px;
}

.btn-edit-subtask, .btn-remove-subtask {
    background: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit-subtask:hover, .btn-remove-subtask:hover {
    background: #545b62;
}

.subtask-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.allowed-column, .not-allowed-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.column-header {
    font-weight: 600;
    color: #333;
    font-size: 12px;
    text-align: center;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.allowed-header {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.not-allowed-header {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.action-item {
    display: flex;
    align-items: stretch;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
}

.action-item.editing {
    background: white;
    cursor: move;
}

.action-item:hover {
    border-color: rgb(0, 106, 170);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.action-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.action-item.drag-over {
    border-color: rgb(0, 165, 88);
    background: #f8fff9;
}

.action-item input,
.action-item textarea {
    width: 100%;
    border: none;
    outline: none;
    font-size: 12px;
    line-height: 1.4;
    background: transparent;
    font-family: inherit;
    resize: none;
    min-height: 40px;
    cursor: default;
}

.action-item.editing textarea {
    resize: vertical;
    cursor: text;
}

.action-item textarea {
    margin: 8px;
    padding: 8px 10px;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
    flex: 1 1 auto;
    height: 100%;
}

.add-action-btn {
    background: #e9ecef;
    color: #6c757d;
    border: 1px dashed #ced4da;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.add-action-btn:hover {
    background: #dee2e6;
    border-color: #adb5bd;
}



/* Right panel */
.right-panel {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 200px;
    max-height: 100%;
    overflow: hidden;
}

/* Output header */
.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 10px 15px 0px;
    border-bottom: 2px solid #f0f0f0;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.output-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.apply-btn, .download-btn {
    border: none;
    padding: 5px 20px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-btn {
    background-color: rgb(12,84,134);
    color: white;
}

.apply-btn:hover {
    background-color: rgb(18, 39, 70);
    transform: translateY(-1px);
}

.download-btn {
    background-color: rgb(0, 165, 88);
    color: white;
}

.download-btn:hover {
    background-color: rgb(0, 104, 55);
    transform: translateY(-1px);
}

/* Output content */
.output-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    padding-right: 30px; /* Extra space for scrollbar */
    min-height: 0; /* Allow flex item to shrink */
}

/* Custom scrollbar for the output content */
.output-content::-webkit-scrollbar {
    width: 8px;
}

.output-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.output-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.output-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.guideline-output {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
}

.guideline-output h1 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.guideline-output h2 {
    font-size: 20px;
    font-weight: 600;
    color: #555;
    margin: 25px 0 15px 0;
}

.guideline-output p {
    margin: 0 0 15px 0;
}

.no-output {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-style: italic;
    text-align: center;
}

.no-output p {
    margin: 0;
    font-size: 16px;
}

/* Action buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 50px;
    flex-shrink: 0;
}

.btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary {
    background-color: transparent;
    color: #666;
    border: 2px solid #ddd;
    padding: 10px 20px;
}

.btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: #999;
    transform: translateY(-1px);
}

/* Responsive design */
@media (max-width: 1024px) {
    .panels-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .arrow-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .page-wrapper {
        padding: 15px;
    }
    
    .left-panel,
    .right-panel {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .panels-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .page-wrapper {
        padding: 10px;
    }
    
    .left-panel,
    .right-panel {
        padding: 15px;
    }
    
    .arrow-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .panels-container {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .page-wrapper {
        padding: 8px;
    }
    
    .header {
        margin-bottom: 15px;
    }
    
    .title {
        margin-left: 15px;
        margin-top: 10px;
        margin-bottom: 10px;
    }
    
    .guideline-header h2 {
        font-size: 20px;
    }
    
    .left-panel,
    .right-panel {
        padding: 12px;
    }
    
    .left-panel h3,
    .output-header h3 {
        font-size: 16px;
    }
    
    .action-buttons-above {
        gap: 8px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .apply-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* Structured Guidelines Styles */
.guideline-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guideline-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.guideline-content {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: #333;
}

.guideline-content p {
    margin: 0 0 15px 0;
}

.guideline-content ul {
    margin: 0 0 15px 0;
    padding-left: 20px;
}

.guideline-content li {
    margin-bottom: 10px;
}

/* Subtasks specific styling */
.subtask-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.subtask-item:last-child {
    margin-bottom: 0;
}

.subtask-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
}

.subtask-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.allowed-section, .not-allowed-section {
    padding: 12px;
    border-radius: 6px;
}

.allowed-section {
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
}

.not-allowed-section {
    background: #ffeaea;
    border: 1px solid #f5c6c6;
}

.section-header {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 12px;
}

.allowed-section .section-header {
    color: #2d5a2d;
}

.not-allowed-section .section-header {
    color: #8b2a2a;
}

.action-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.action-list li {
    margin-bottom: 6px;
    padding: 6px 10px;
    background: white;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.allowed-section .action-list li {
    border-left: 3px solid #28a745;
}

.not-allowed-section .action-list li {
    border-left: 3px solid #dc3545;
}

.action-list li:last-child {
    margin-bottom: 0;
}

.empty-section {
    text-align: center;
    padding: 15px;
    color: #666;
    font-style: italic;
    font-size: 12px;
}

/* Rationale accordion styling */
.rationale-accordion {
    margin-top: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.rationale-header {
    width: 100%;
    padding: 10px 12px;
    background: #f8f9fa;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
}

.rationale-header:hover {
    background: #e9ecef;
}

.rationale-header.active {
    background: rgb(0, 106, 170);
    color: white;
}

.rationale-title {
    flex: 1;
}

.rationale-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.rationale-content {
    display: none;
    padding: 12px;
    background: white;
    border-top: 1px solid #f0f0f0;
    font-size: 15px;
    line-height: 1.4;
    color: #555;
}

.rationale-section {
    margin-bottom: 10px;
}

.rationale-section:last-child {
    margin-bottom: 0;
}

.rationale-section-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 11px;
}

.rationale-section-content {
    font-size: 11px;
    line-height: 1.3;
}

/* Help icon and tooltip styles */
.label-with-help {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.label-with-help label {
    margin-bottom: 0;
    flex: 1;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: rgb(0, 106, 170);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.help-icon:hover {
    background-color: rgb(18, 39, 70);
    transform: scale(1.1);
}

/* Policy Requirements Grid */
.policy-requirements-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.policy-requirement {
    display: flex;
    flex-direction: column;
}

.policy-requirement label {
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    font-size: 13px;
}

.policy-requirement textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    line-height: 1.4;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.3s ease;
}

.policy-requirement textarea:focus {
    outline: none;
    border-color: rgb(0, 106, 170);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.policy-requirement textarea::placeholder {
    color: #999;
    font-size: 11px;
}

/* Responsive design for policy requirements */
@media (max-width: 768px) {
    .policy-requirements-grid {
        gap: 12px;
    }
}

.help-tooltip {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.tooltip-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px 25px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
}

.tooltip-header span:first-child {
    font-weight: 600;
    font-size: 18px;
    color: #333;
}

.tooltip-close {
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    line-height: 1;
}

.tooltip-close:hover {
    background-color: #e0e0e0;
    color: #333;
}

#tooltip-body {
    padding: 20px 25px 25px 25px;
    line-height: 1.6;
    color: #555;
    font-size: 14px;
    overflow-y: auto;
    max-height: 60vh;
}

/* Responsive design for tooltips */
@media (max-width: 768px) {
    .tooltip-content {
        width: 95%;
        margin: 20px;
    }
    
    .tooltip-header {
        padding: 15px 20px 10px 20px;
    }
    
    #tooltip-body {
        padding: 15px 20px 20px 20px;
        font-size: 13px;
    }
    
    .help-icon {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
}

/* Allowed actions: green border */
.allowed-column .action-item,
.allowed-section .action-list li {
    border: 2px solid #4CAF50;
    background: #f6fff6;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* Not allowed actions: red border */
.not-allowed-column .action-item,
.not-allowed-section .action-list li {
    border: 2px solid #e53935;
    background: #fff6f6;
    border-radius: 6px;
    margin-bottom: 8px;
}

.drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 10px;
    background: #f0f0f0;
    cursor: grab;
    user-select: none;
    border-radius: 6px 0 0 6px;
    transition: background 0.2s;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.drag-handle:hover, .action-item.dragging .drag-handle {
    background: #e0e0e0;
}

.drag-dots {
    display: grid;
    grid-template-columns: repeat(2, 6px);
    grid-template-rows: repeat(4, 6px);
    gap: 3px 2px;
}

.drag-dots span {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cccccc;
    transition: background 0.2s;
}

.drag-handle:hover .drag-dots span,
.action-item.dragging .drag-handle .drag-dots span {
    background: #888;
}

.action-items {
    min-height: 48px;
    position: relative;
}

.action-items:empty::after {
    content: "Drop here";
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 13px;
    height: 100%;
    width: 100%;
    position: absolute;
    left: 0; top: 0;
    pointer-events: none;
    opacity: 0.7;
}

.action-placeholder {
    height: 40px;
    background: #bbdefb;
    border-radius: 4px;
    margin: 4px 0;
    border: 2px dashed #1976d2;
}

/* Guideline Page Styles */

.page-wrapper {
    min-height: 100vh;
    padding: 20px 0;
}

.content-container {
    max-width: 1600px;
    width: 80%;
    margin: auto;
    padding: 0 20px;
}

.header-section {
    text-align: center;
    margin-bottom: 20px;
}

.header-section h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 28px;
    margin-top: 20px;
}

.header-section .subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
}

.guideline-container {
    background: white;
    border-radius: 12px;
    margin: 0 auto 30px auto;
    max-width: 1000px;
    height: 100%;
    padding: 40px;
    background: rgb(242, 242, 242);
    border: 2px solid rgb(0, 104, 55);
    border-radius: 12px;
    margin: 20px 20px 100px 20px;
}

.guideline-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #dee2e6;
}

.guideline-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.guideline-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-style: italic;
}

.guideline-section {
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid rgb(0, 106, 170);
    transition: all 0.3s ease;
    position: relative;
}

/* Animation for section reordering */
.guideline-section.moving {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.guideline-section.moving-up {
    animation: slideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.guideline-section.moving-down {
    animation: slideDown 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-10px);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(10px);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Highlight effect for the section being moved */
.guideline-section.highlight {
    background-color: #f8f9fa;
    border-left-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.guideline-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    margin-top: 0;
}

.stance-content, .disclosure-content, .academic-integrity-content, .approved-tools-content, .data-protection-content {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    transition: all 0.3s ease;
}

.stance-display {
    margin-bottom: 20px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.rationale-display {
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.rationale-display strong {
    color: #333;
    font-size: 15px;
}

/* Expandable rationale styles */
.rationale-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 10px;
    transition: background-color 0.2s ease, all 0.3s ease;
    gap: 8px;
}

.rationale-header:hover {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 8px;
    margin: 0 -8px 10px -8px;
}

.rationale-toggle-icon {
    font-size: 12px;
    color: #6c757d;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.rationale-header.collapsed .rationale-toggle-icon {
    transform: rotate(-90deg);
}

.rationale-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    padding: 10px 0;
    opacity: 1;
}

.rationale-content.collapsed {
    max-height: 0;
    padding: 0;
    opacity: 0;
    transform: translateY(-10px);
    display: none;
}

/* Specific styling for genai-stance section */
#guideline-genai-stance {
    transition: all 0.3s ease;
}

#guideline-genai-stance .stance-content {
    transition: all 0.3s ease;
}

#guideline-genai-stance .stance-display {
    transition: all 0.3s ease;
}

#guideline-genai-stance .rationale-display {
    transition: all 0.3s ease;
}

/* Color coding for allowed and not allowed sections */
.allowed-actions {
    background-color: #f8fff8;
    border-left: 4px solid #28a745;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.allowed-actions strong {
    color: #155724;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.not-allowed-actions {
    background-color: #fff8f8;
    border-left: 4px solid #dc3545;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.not-allowed-actions strong {
    color: #721c24;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.allowed-actions ul,
.not-allowed-actions ul {
    margin: 5px 0 0 0;
    padding-left: 18px;
}

.allowed-actions li,
.not-allowed-actions li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.allowed-actions li {
    color: #155724;
}

.not-allowed-actions li {
    color: #721c24;
}

/* Multiple rationale formatting */
.rationale-content .rationale-item {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
    border-radius: 4px;
}

.rationale-content .rationale-item:last-child {
    margin-bottom: 0;
}

.rationale-content .rationale-item:not(:last-child) {
    margin-bottom: 15px;
}

/* Mobile responsiveness for rationale */
@media (max-width: 768px) {
    .rationale-header {
        padding: 10px 0;
        margin-bottom: 8px;
    }
    
    .rationale-header:hover {
        padding: 10px;
        margin: 0 -10px 8px -10px;
    }
    
    .rationale-content {
        padding: 8px 0;
    }
    
    .rationale-content .rationale-item {
        padding: 8px;
        margin-bottom: 12px;
    }
    
    .rationale-toggle-icon {
        font-size: 14px;
    }
}

/* Appropriate uses preview styles */
.appropriate-uses-content {
    font-size: 14px;
    line-height: 1.5;
}

.preview-subtask {
    background: white;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.preview-subtask:last-child {
    margin-bottom: 0;
}

.preview-subtask h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    margin-top: 0;
}

.preview-genai-guidelines {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.preview-allowed {
    font-size: 13px;
    background: #f8fff8;
    border-left: 4px solid rgb(0, 165, 88);
    padding: 10px;
    border-radius: 4px;
}

.preview-not-allowed {
    font-size: 13px;
    background: #fff8f8;
    border-left: 4px solid #dc3545;
    padding: 10px;
    border-radius: 4px;
}

.preview-allowed strong {
    color: #155724;
}

.preview-not-allowed strong {
    color: #721c24;
}

.preview-allowed ul, .preview-not-allowed ul {
    margin: 5px 0 0 0;
    padding-left: 18px;
}

.preview-allowed li, .preview-not-allowed li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.preview-rationale {
    margin-top: 15px;
    padding: 12px;
    background-color: #f8f9fa;
    border-left: 4px solid rgb(0, 106, 170);
    border-radius: 4px;
}

.preview-rationale strong {
    color: #495057;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.preview-no-guidelines {
    background-color: #f8f9fa;
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 10px 0;
}

.preview-no-guidelines p {
    color: #666;
    font-style: italic;
    margin: 0;
}

.no-data {
    font-style: italic;
    color: #999;
    text-align: center;
    margin: 20px 0;
}

/* Guideline section header and edit button styles */
.guideline-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.guideline-section-header h3 {
    margin: 0;
    flex: 1;
}

/* Button styling for edit, remove, and save buttons - matching decision-making page */
.btn-edit-genai-item,
.btn-remove-genai-item {
    background: none;
    border: none;
    padding: 3px 4px 0px 4px;
    cursor: pointer;
    border-radius: 7px;
    transition: background-color 0.2s ease;
}

.btn-edit-genai-item:hover {
    background: rgba(0, 0, 0, 0.1);
}

.btn-edit-genai-item.editing {
    background-color: #dc3545;
}

.btn-edit-genai-item.editing:hover {
    background-color: #c82333;
}

.btn-save-genai-item {
    background: rgb(0, 165, 88);
    color: white;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-size: 12px;
    font-weight: 500;
}

.btn-save-genai-item:hover {
    background: rgb(0, 104, 55);
}

.btn-remove-genai-item:hover {
    background: #dc3545;
    color: white;
}

.btn-save-genai-item,
.btn-cancel-genai-item {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-save-genai-item {
    background: rgb(0, 165, 88);
    color: white;
}

.btn-save-genai-item:hover {
    background: rgb(0, 104, 55);
}

.btn-cancel-genai-item {
    background: #6c757d;
    color: white;
}

.btn-cancel-genai-item:hover {
    background: #5a6268;
}

.action-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.btn-edit-genai-item:hover .action-icon,
.btn-remove-genai-item:hover .action-icon {
    opacity: 1;
}

/* Override the old button styles to use the new ones */
.btn-edit-guideline {
    background: none;
    border: none;
    padding: 3px 4px 0px 4px;
    cursor: pointer;
    border-radius: 7px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.btn-edit-guideline:hover {
    background: rgba(0, 0, 0, 0.1);
}

.btn-edit-guideline.editing {
    background-color: #dc3545;
}

.btn-edit-guideline.editing:hover {
    background-color: #c82333;
}

/* Arrow buttons for moving sections up and down */
.btn-move-up,
.btn-move-down {
    background: none;
    border: none;
    padding: 3px 4px 0px 4px;
    cursor: pointer;
    border-radius: 7px;
    transition: background-color 0.2s ease;
    font-size: 12px;
    color: #666;
}

.btn-move-up:hover,
.btn-move-down:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.btn-move-up:active,
.btn-move-down:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.btn-move-up:disabled,
.btn-move-down:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-move-up:disabled:hover,
.btn-move-down:disabled:hover {
    background: none;
    color: #666;
}

.arrow-up,
.arrow-down {
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

/* Section actions container */
.section-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Remove section button */
.btn-remove-section {
    background: none;
    border: none;
    padding: 3px 4px 0px 4px;
    cursor: pointer;
    border-radius: 7px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.btn-remove-section:hover {
    background: #dc3545;
    color: white;
}

/* Drag and drop styles */
.guideline-section {
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}



/* Removed sections container */
.removed-sections-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    border-left: 4px solid #6c757d;
}

.removed-sections-header {
    margin-bottom: 15px;
}

.removed-sections-header h3 {
    color: #6c757d;
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.removed-sections-header p {
    color: #6c757d;
    margin: 0;
    font-size: 0.9rem;
    font-style: italic;
}

.removed-sections-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.removed-section-item {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    transition: background-color 0.2s ease;
}

.removed-section-item:hover {
    background-color: #f8f9fa;
}

.removed-section-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.removed-section-title {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.9rem;
}

.btn-restore-section {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-restore-section:hover {
    background-color: #218838;
}

/* Responsive design for section actions */
@media (max-width: 768px) {
    .section-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .btn-edit-guideline,
    .btn-remove-section {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .removed-sections-container {
        margin-top: 20px;
        padding: 15px;
    }
    
    .removed-section-content {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .btn-restore-section {
        align-self: flex-end;
    }
}

/* Guideline edit form styles */
.guideline-edit-form {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin-top: 15px;
}

.guideline-edit-form .form-section {
    margin-bottom: 20px;
}

.guideline-edit-form .form-section:last-child {
    margin-bottom: 0;
}

.guideline-edit-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.guideline-edit-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
}

.guideline-edit-form textarea:focus {
    outline: none;
    border-color: rgb(0, 106, 170);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.guideline-edit-form textarea::placeholder {
    color: #6c757d;
    font-style: italic;
}

.edit-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.edit-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.edit-actions .btn-primary {
    background-color: rgb(0, 106, 170);
    color: white;
    border: none;
}

.edit-actions .btn-primary:hover {
    background-color: rgb(18, 39, 70);
}

.edit-actions .btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
}

.edit-actions .btn-secondary:hover {
    background-color: #545b62;
}

/* Clickable guideline sections */
.clickable-guideline {
    cursor: default;
}

/* Responsive styles for edit functionality */
@media (max-width: 768px) {
    .guideline-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-edit-guideline {
        align-self: flex-end;
        margin-left: 0;
    }
    
    .guideline-edit-form {
        padding: 15px;
    }
    
    .edit-actions {
        flex-direction: column;
    }
    
    .edit-actions .btn {
        width: 100%;
    }

}

.guideline-document {
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.guideline-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.guideline-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.guideline-section-header {
    margin-bottom: 20px;
}

.guideline-section-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
    display: inline-block;
}

/* Stance Content */
.stance-content {
    padding: 20px;
    border-radius: 8px;
}

.stance-display {
    margin-bottom: 15px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.rationale-display {
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
}

/* Appropriate Uses Content */
.appropriate-uses-content {
    background: #f8f9fa;
    border-radius: 8px;
}

.guideline-subtask {
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.guideline-subtask:last-child {
    margin-bottom: 0;
}

.guideline-subtask h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #27ae60;
}

.guideline-subtask-content {
    line-height: 1.6;
}

.learning-objective {
    margin-bottom: 15px;
    padding: 10px;
    background: #f1f8ff;
    border-radius: 4px;
    border-left: 3px solid rgb(0, 106, 170);
}

.genai-guidelines {
    margin-top: 15px;
}

.allowed-actions,
.not-allowed-actions {
    margin-bottom: 15px;
}

.allowed-actions strong {
    color: #27ae60;
}

.not-allowed-actions strong {
    color: #e74c3c;
}

.allowed-actions ul,
.not-allowed-actions ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.allowed-actions li,
.not-allowed-actions li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.rationale {
    margin-top: 15px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

.rationale strong {
    color: #856404;
}

.no-guidelines {
    color: #6c757d;
    font-style: italic;
}

/* Disclosure Content */
.disclosure-content {
    padding: 20px;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.6;
}

/* Academic Integrity Content */
.academic-integrity-content {
    padding: 20px;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.6;
}

/* Approved Tools Content */
.approved-tools-content {
    padding: 20px;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.6;
}

/* Data Protection Content */
.data-protection-content {
    padding: 20px;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.6;
}

/* No Data State */
.no-data {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-container {
        padding: 0 15px;
    }
    
    .guideline-document {
        padding: 20px;
    }
    
    .header-section h1 {
        font-size: 2rem;
    }
    
    .guideline-section-header h2 {
        font-size: 1.5rem;
    }
    
    .action-buttons .btn {
        display: block;
        margin: 10px auto;
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .guideline-document {
        padding: 15px;
    }
    
    .header-section h1 {
        font-size: 1.8rem;
    }
    
    .guideline-section-header h2 {
        font-size: 1.3rem;
    }
    
    .stance-content,
    .appropriate-uses-content,
    .disclosure-content,
    .academic-integrity-content,
    .approved-tools-content,
    .data-protection-content {
        padding: 15px;
    }
}

/* New section styles for updated guideline structure */
.permitted-use-section,
.disclosure-requirement-section,
.citation-section,
.consequence-section,
.approved-tools-section,
.data-protection-section {
    margin-bottom: 15px;
    padding: 10px 0;
}

.permitted-use-section strong,
.disclosure-requirement-section strong,
.citation-section strong,
.consequence-section strong,
.approved-tools-section strong,
.data-protection-section strong {
    color: #333;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.citation-section,
.data-protection-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

@media (max-width: 768px) {
    .permitted-use-section,
    .disclosure-requirement-section,
    .citation-section,
    .consequence-section,
    .approved-tools-section,
    .data-protection-section {
        margin-bottom: 12px;
        padding: 8px 0;
    }
}
