/*
 * History Viewer Styles
 * Inherits/copies many styles from the main plugin for consistency
 */

/* Container for the history page */
.interview-history-container {
    max-width: 800px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    color: #333;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 30px 40px; /* Add padding to the main container */
}

/* Heading styles - Match original */
.interview-heading {
    text-align: center;
    margin-bottom: 35px;
}

.interview-heading h2 {
    font-size: 26px;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 600;
}

.interview-heading p { /* Used for list description */
    font-size: 16px;
    color: #7f8c8d;
    line-height: 1.4;
}

/* --- Session List Styles (Card View) --- */
.interview-session-list.card-list {
    list-style: none;
    margin: 0;
    padding: 0;
    /* Remove the list border */
    border: none;
    border-radius: 0;
    overflow: visible; /* Allow shadows */
    background-color: transparent; /* List container background not needed */
}

.interview-session-list.card-list li {
    border-bottom: none; /* Remove line separators */
    margin-bottom: 15px; /* Space between cards */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* Subtle shadow */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    overflow: hidden; /* Contain rounded corners */
}

.interview-session-list.card-list li:hover {
     transform: translateY(-3px); /* Lift effect on hover */
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12); /* More prominent shadow on hover */
}


.interview-session-list.card-list li a {
    display: flex; /* Use flexbox */
    flex-direction: column; /* Stack content vertically by default */
    align-items: flex-start; /* Align text to the left */
    padding: 15px 20px; /* Padding inside the card */
    text-decoration: none;
    color: #333; /* Darker text */
    width: 100%;
    box-sizing: border-box; /* Include padding in width */
    position: relative; /* For view icon absolute positioning */
}

.interview-session-list.card-list .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Space out date/time and difficulty */
    width: 100%;
    margin-bottom: 10px; /* Space between header and body */
    font-size: 13px;
    color: #7f8c8d;
    flex-wrap: wrap; /* Allow header items to wrap */
}

.interview-session-list.card-list .session-date,
.interview-session-list.card-list .session-time {
     font-weight: normal;
     flex-shrink: 0; /* Prevent shrinking */
     /* Adjusted padding/margins might be needed based on specific content */
}
.interview-session-list.card-list .session-date {
     margin-right: 5px; /* Space between date and time */
}

.interview-session-list.card-list .session-difficulty {
    font-style: normal; /* Remove italic */
    color: #fff; /* White text on badge */
    background-color: #bdc3c7; /* Default grey */
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px; /* Smaller font size for badge */
    font-weight: 600;
    flex-shrink: 0;
     margin-left: auto; /* Push difficulty to the right */
}

/* Difficulty specific badge colors */
.interview-session-list.card-list .session-difficulty.difficulty-easy { background-color: #2ecc71; } /* Green */
.interview-session-list.card-list .session-difficulty.difficulty-medium { background-color: #f39c12; } /* Orange */
.interview-session-list.card-list .session-difficulty.difficulty-hard { background-color: #e74c3c; } /* Red */


.interview-session-list.card-list .card-body {
    width: 100%;
    margin-bottom: 10px; /* Space between body and icon */
}

.interview-session-list.card-list .session-role {
    font-size: 18px; /* Larger font size for role */
    font-weight: 600; /* Bolder role */
    color: #2c3e50; /* Darker color */
    margin: 0; /* Remove default h4 margin */
    padding: 0;
}


.interview-session-list.card-list .view-icon {
    font-size: 20px; /* Slightly larger icon */
    color: #3498db; /* Blue icon */
    position: absolute; /* Position it absolutely within the link */
    right: 20px; /* Align to the right */
    bottom: 15px; /* Align to the bottom */
    transition: color 0.3s;
}

.interview-session-list.card-list li a:hover .view-icon {
     color: #2980b9; /* Darker blue on hover */
}


/* --- Session Details / Feedback Styles (Keep These) --- */
/* These styles are inherited from the previous version for the analysis page */

.back-to-history {
     margin-bottom: 25px;
     font-size: 15px;
}
.back-to-history a {
     text-decoration: none;
     color: #3498db;
     font-weight: 500;
}
.back-to-history a:hover {
    text-decoration: underline;
}

.session-details {
    margin-bottom: 35px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.session-details h3 {
     margin-bottom: 15px;
     color: #343a40;
     font-size: 18px;
     font-weight: 600;
     border-bottom: 1px solid #dee2e6;
     padding-bottom: 10px;
}
.session-details p {
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}
.session-details strong {
    color: #343a40;
}
.session-details .jd-snippet {
     margin-top: 15px;
     padding: 10px;
     background-color: #eef7ff;
     border-left: 4px solid #2271b1;
     color: #333;
     border-radius: 4px;
}
.session-details .jd-snippet p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #495057;
}
.session-details .jd-snippet strong {
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

.results-container {
    margin-bottom: 30px;
}

.analysis-summary {
    text-align: center;
    margin-bottom: 35px;
    padding: 25px 20px;
    background-color: #eaf5ff;
    border-radius: 8px;
    border: 1px solid #cce4ff;
}
.analysis-summary h3 {
     margin-bottom: 15px;
     color: #1b6aaa;
     font-size: 18px;
     font-weight: 600;
}
.score {
    font-size: 48px;
    font-weight: 700;
    color: #2ecc71;
    margin: 5px 0 10px 0;
    line-height: 1.1;
}
.score span {
    font-size: 20px;
    color: #7f8c8d;
    font-weight: 400;
    margin-left: 5px;
}
.rating {
    font-size: 18px;
    font-weight: 500;
    color: #3498db;
}

.analysis-details {
     margin-bottom: 35px;
     padding: 25px;
     background-color: #f8f9fa;
     border-radius: 8px;
     border: 1px solid #e9ecef;
 }
 .analysis-details h3, .questions-review h3, .improvement-suggestions h3 {
     margin-bottom: 20px;
     color: #343a40;
     font-size: 18px;
     font-weight: 600;
     border-bottom: 1px solid #dee2e6;
     padding-bottom: 10px;
 }

.performance-metrics { /* Container for metrics */ }
.metric {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.metric-name {
    width: 150px;
    flex-shrink: 0;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
    padding-right: 15px;
}
.metric-bar {
    flex-grow: 1;
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin: 0 10px;
    min-width: 100px;
}
.metric-progress {
    height: 100%;
    background-color: #3498db;
    border-radius: 5px;
}
.metric-score {
    width: 40px;
    text-align: right;
    font-weight: 600;
    font-size: 14px;
    color: #3498db;
    flex-shrink: 0;
}

.analysis-feedback {
    margin-bottom: 35px;
    padding: 25px;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.feedback-content {
    line-height: 1.7;
    font-size: 15px;
    color: #495057;
}
.feedback-content br { margin-bottom: 0.5em; }

.questions-review { margin-bottom: 35px; }
.accordion {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
}
.accordion-item { border-bottom: 1px solid #dee2e6; }
.accordion-item:last-child { border-bottom: none; }
.accordion-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
    color: #495057;
    user-select: none;
}
.accordion-header:hover { background-color: #e9ecef; }
.accordion-header::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: #adb5bd;
    transition: transform 0.3s ease;
}
.accordion-header.active { background-color: #e2e6ea; }
.accordion-header.active::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}
.accordion-content {
    display: none;
    padding: 20px;
    background-color: #fff;
    border-top: 1px solid #dee2e6;
}
.review-question, .review-answer, .review-followup-question, .review-followup-answer, .review-feedback {
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 14px;
    color: #495057;
}
.review-question strong, .review-followup-question strong {
    color: #343a40;
    margin-right: 5px;
}
.review-answer, .review-followup-answer {
    padding-left: 20px;
    color: #6c757d;
}
.review-answer em, .review-followup-answer em { color: #adb5bd; }
.review-feedback {
    padding: 15px;
    background-color: #f1f3f5;
    border-radius: 5px;
    border: 1px solid #e9ecef;
    margin-top: 15px;
    font-size: 14px;
}
.review-feedback strong {
    color: #343a40;
    display: block;
    margin-bottom: 5px;
}

.improvement-suggestions {
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.improvement-suggestions h3 {
     margin-bottom: 20px;
     color: #343a40;
     font-size: 18px;
     font-weight: 600;
     border-bottom: 1px solid #dee2e6;
     padding-bottom: 10px;
 }
.improvement-suggestions ul {
    padding-left: 20px;
    margin: 0;
}
.improvement-suggestions li {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 15px;
    color: #495057;
}
.improvement-suggestions li::marker {
    color: #3498db;
}


/* Responsive adjustments for history list */
@media (max-width: 768px) {
    .interview-history-container {
        margin: 10px;
        box-shadow: none;
        border-radius: 0;
        padding: 20px;
    }

    /* Card layout on mobile */
    .interview-session-list.card-list li a {
         flex-direction: column;
         align-items: flex-start;
         padding-bottom: 40px; /* Add space for icon positioned at bottom right */
    }

    .interview-session-list.card-list .card-header {
        flex-direction: column; /* Stack date/time and difficulty */
        align-items: flex-start;
        margin-bottom: 8px;
    }

    .interview-session-list.card-list .session-date,
    .interview-session-list.card-list .session-time {
         width: 100%;
         text-align: left;
         margin-right: 0; /* Remove margin */
    }
    .interview-session-list.card-list .session-time {
         margin-bottom: 5px; /* Space between time and difficulty */
    }


    .interview-session-list.card-list .session-difficulty {
        margin-left: 0; /* Remove auto margin */
        width: auto; /* Auto width for badge */
         text-align: center;
         padding: 2px 6px; /* Adjust padding */
         font-size: 10px; /* Smaller font */
    }

    .interview-session-list.card-list .card-body {
        margin-bottom: 8px;
    }
     .interview-session-list.card-list .session-role {
         font-size: 16px; /* Smaller role font on mobile */
     }


     .interview-session-list.card-list .view-icon {
         font-size: 18px;
         right: 15px;
         bottom: 15px;
     }


     /* Metric adjustment (already there from previous version) */
     .metric {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 20px;
    }
    .metric-name {
        width: 100%;
        margin-bottom: 5px;
        padding-right: 0;
    }
    .metric-bar {
        width: 100%;
        margin: 5px 0;
    }
    .metric-score {
        width: auto;
        text-align: left;
        margin-top: 5px;
    }
    .accordion-header {
         padding-right: 45px;
     }
     .accordion-header::after {
         right: 15px;
     }
}

/* Add more specific mobile adjustments if needed */
@media (max-width: 480px) {
     .interview-history-container {
         padding: 15px;
     }
      .interview-heading h2 {
          font-size: 22px;
      }
      .interview-heading p {
          font-size: 14px;
      }
     .interview-session-list.card-list li a {
         padding: 12px 15px 40px 15px; /* Adjust padding */
     }

     .interview-session-list.card-list .session-role {
          font-size: 15px;
     }
}