.case-project-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.case-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
}

.case-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 80px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    max-width: 1300px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.case-modal-body h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.case-agreement-text {
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
}

.case-agreement-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.case-agreement-buttons .button {
    padding: 10px 30px;
    font-size: 16px;
}

.case-project-content h1 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #333;
}

.case-items-container {
    margin-bottom: 40px;
}

.case-item {
    margin-bottom: 40px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.case-item h2 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #000000;
}

.case-item-section {
    margin-top: 20px;
}

.case-audio-section,
.case-test-paper-section,
.case-script-section,
.case-notes-section {
    margin-bottom: 25px;
}

.case-audio-section h3,
.case-test-paper-section h3,
.case-script-section h3,
.case-notes-section h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #555;
}

.case-audio-section audio {
    width: 100%;
    max-width: 600px;
    margin-top: 10px;
}

.case-pdf-viewer {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: auto;
}

.case-pdf-container {
    position: relative;
    width: 100%;
}

.case-pdf-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 50px;
    background: #333;
    z-index: 999;
    pointer-events: none;
}

.case-notes-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    min-height: 120px;
}

.case-notes-editor[contenteditable="true"] {
    resize: vertical;
    overflow-y: auto;
}

.case-notes-editor[contenteditable="true"]:empty:before {
    content: attr(data-placeholder);
    color: #999;
}

.case-notes-editor[contenteditable="true"]:focus:before {
    content: '';
}
.case-notes-textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

.case-toggle-script {
    background: #0073aa;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.case-toggle-script:hover {
    background: #005a87;
}

.case-script-content {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 4px;
}

.case-submit-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #000000;
    margin-top: 40px;
}

.case-submit-section h3 {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 20px;
    color: rgb(0 0 0);
}

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

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

.case-input {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.case-input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

#caseSubmitBtn {
    background: rgb(242 105 59);
    color: #fff;
    padding: 12px 40px;
    font-size: 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

#caseSubmitBtn:hover {
    background: #f2693b;
}

.woocommerce-login-form {
    margin-top: 20px;
}

hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 30px 0;
}

@media (max-width: 768px) {
    .case-modal-content {
        width: 95%;
        padding: 40px 20px;
    }
    
    .case-project-content h1 {
        font-size: 24px;
    }
    
    .case-item {
        padding: 20px;
    }
    
    .case-pdf-viewer {
        height: 400px;
    }
    
    .case-submit-section {
        padding: 20px;
    }
    
    .case-toc-section {
        padding: 20px 20px;
        background: #f9f9f9;
        margin-bottom: 20px;
        border-left: solid 5px #000000;
        border-radius: 5px;
    }
}

@media print {
    .case-pdf-container[data-no-print="true"],
    .case-pdf-viewer {
        display: none !important;
    }
    
    body::before {
        content: "Printing is not allowed for copyright protection";
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 24px;
        color: #333;
    }
}
/* Table of Contents Styles */
.case-toc-section {
    padding: 20px 50px;
    background: #f9f9f9;
    margin-bottom: 20px;
    border-left: solid 5px #000000;
    border-radius: 5px;
}

.case-toc-section h5 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    color: rgb(4,30,73);
}

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

.case-toc-list li {
    margin-bottom: 10px;
}

.case-toc-link {
    display: block;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    color: #000;
}

.case-toc-link.active {
    color: #f2693b;
}

/* Navigation Buttons */
.case-navigation {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.case-prev-btn,
.case-next-btn {
    background: #0073aa;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.case-prev-btn:hover,
.case-next-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.case-prev-btn:active,
.case-next-btn:active {
    transform: translateY(0);
}

/* Permission Denied Modal Styles */
.case-permission-denied-modal .case-modal-body {
    text-align: center;
}

.case-permission-denied-modal h2 {
    color: #d32f2f;
    font-size: 28px;
    margin-bottom: 20px;
}

.case-permission-denied-modal p {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

#caseGoBackBtn {
    background-color: #0073aa;
    color: white;
    border: 1px solid #0073aa;
    padding: 10px 30px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

#caseGoBackBtn:hover {
    background-color: #005a87;
}
