/* Mortgage CE Selector - Frontend Styles */
:root {
    --mcs-blue: #009fe3;
    --mcs-blue-dark: #0088c4;
    --mcs-blue-light: #e6f4fa;
    --mcs-blue-hover: #f0f9ff;
}
.mcs-container {
    max-width: 900px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.mcs-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    padding: 0 20px;
}
.mcs-steps::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}
.mcs-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: default;
}
.mcs-step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}
.mcs-step.active .mcs-step-number {
    background: var(--mcs-blue);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,159,227,0.3);
}
.mcs-step.completed .mcs-step-number {
    background: #34a853;
    color: #fff;
}
.mcs-step-label {
    font-size: 14px;
    color: #999;
    font-weight: 500;
    text-align: center;
}
.mcs-step.active .mcs-step-label {
    color: var(--mcs-blue);
}
.mcs-step.completed .mcs-step-label {
    color: #34a853;
}
.mcs-step-content {
    display: none;
    animation: fadeIn 0.4s ease;
}
.mcs-step-content.active {
    display: flow-root;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.mcs-step-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #202124;
    margin: 0 0 8px 0;
}
.mcs-step-content p {
    color: #5f6368;
    margin-bottom: 24px;
}
.mcs-step-content-inner {
    border-radius: 8px;
    padding: 16px 24px;
    max-width: 776px;
    margin: 0 auto;
}
.mcs-step-content-inner h2 {
    font-size: 28px;
    font-weight: 600;
    color: #202124;
    margin: 0 0 4px 0;
}
.mcs-state-label {
    font-size: 16px;
    font-weight: 700;
    margin: 12px 0 16px 0;
    display: block;
    color: #202124;
}
.mcs-bundle-interactions {
    position: relative;
}
.mcs-search-wrapper {
    position: relative;
}
.mcs-search-toggle {
    background: #fff;
    color: #5f6368;
    font-weight: 400;
    font-size: 16px;
    padding: 12px 16px;
    height: 52px;
    border: 2px solid #dadce0;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mcs-search-toggle:hover {
    border-color: var(--mcs-blue);
}
.mcs-search-toggle.active {
    border-color: var(--mcs-blue);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: #fff;
}
.mcs-toggle-icon {
    font-size: 12px;
    color: #999;
    transition: transform 0.2s ease;
}
.mcs-search-toggle.active .mcs-toggle-icon {
    transform: rotate(180deg);
}
.mcs-dropdown-container {
    display: none;
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid var(--mcs-blue);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 1000;
    max-height: 320px;
    overflow: hidden;
}
.mcs-dropdown-container.open {
    display: block;
}
.mcs-dropdown-search {
    padding: 10px 12px;
    border-bottom: 1px solid #e8eaed;
    background: #fafafa;
}
.mcs-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
    background: #fff;
}
.mcs-search-input:focus {
    border-color: var(--mcs-blue);
    box-shadow: 0 0 0 3px rgba(0,159,227,0.1);
}
.mcs-search-input::placeholder {
    color: #999;
}
.mcs-dropdown-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 0;
}
.mcs-dropdown-list::-webkit-scrollbar {
    width: 6px;
}
.mcs-dropdown-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.mcs-dropdown-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
.mcs-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}
.mcs-dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 14px;
    color: #202124;
}
.mcs-dropdown-item:hover {
    background: var(--mcs-blue-hover);
}
.mcs-dropdown-item input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--mcs-blue);
}
.mcs-dropdown-item .state-name {
    flex: 1;
    user-select: none;
}
.mcs-dropdown-item.selected {
    background: var(--mcs-blue-light);
}
.mcs-dropdown-item.selected .state-name {
    color: var(--mcs-blue);
    font-weight: 500;
}
.mcs-selected-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 4px 4px 4px;
    min-height: 20px;
}
.mcs-selected-state-tag {
    display: inline-flex;
    align-items: center;
    background: var(--mcs-blue-light);
    color: var(--mcs-blue);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    gap: 6px;
    animation: tagAppear 0.2s ease;
}
@keyframes tagAppear {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.mcs-selected-state-tag .remove-state {
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    color: var(--mcs-blue);
    opacity: 0.6;
    line-height: 1;
    padding: 0 2px;
}
.mcs-selected-state-tag .remove-state:hover {
    opacity: 1;
}
#mcs-course-summary {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 16px 0 24px 0;
}
#mcs-course-summary span {
    font-size: 15px;
    font-weight: 500;
}
.mcs-required-hours {
    color: #ea4335;
}
.mcs-selected-hours {
    color: #34a853;
}
.mcs-course-section {
    margin-bottom: 24px;
}
.mcs-course-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #202124;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8eaed;
}
.mcs-course-section-subtitle {
    color: #5f6368;
    font-size: 14px;
    margin: -8px 0 12px 0;
}
.mcs-course-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border: 2px solid #e8eaed;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    background: #fff;
}
.mcs-course-item:hover {
    border-color: #d2d5d9;
}
.mcs-course-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 16px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--mcs-blue);
}
.mcs-course-info {
    flex-grow: 1;
}
.mcs-course-name {
    font-size: 15px;
    font-weight: 500;
    color: #202124;
    display: block;
}
.mcs-course-meta {
    font-size: 13px;
    color: #5f6368;
    margin-top: 4px;
}
.mcs-course-meta .mcs-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 8px;
}
.mcs-badge-core-all {
    background: var(--mcs-blue);
    color: #fff;
}
.mcs-badge-core-selected {
    background: var(--mcs-blue);
    color: #fff;
}
.mcs-badge-state {
    background: #662483;
    color: #fff;
}
.mcs-course-price {
    font-weight: 600;
    color: #202124;
    margin-left: 12px;
    white-space: nowrap;
    font-size: 15px;
}
.mcs-regular-price {
    text-decoration: line-through;
    color: #ccc;
    font-size: 13px;
    margin-right: 8px;
}
.mcs-sale-price {
    color: #333;
    font-weight: 700;
}
.mcs-sale-badge {
    background: #d32f2f;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}
.mcs-course-item.core-all-course {
    border-color: var(--mcs-blue-light);
    background: #f8faff;
}
.mcs-course-item.core-selected-course {
    border-color: var(--mcs-blue-light);
    background: #f0f5ff;
}
.mcs-course-item.state-course {
    border-color: #662483;
    background: #f5edf9;
}
.mcs-no-courses {
    text-align: center;
    padding: 60px 20px;
    color: #5f6368;
}
.mcs-no-courses .mcs-no-courses-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}
.mcs-no-courses h3 {
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 8px 0;
    color: #202124;
}
.mcs-no-courses p {
    margin: 0;
    font-size: 15px;
}
.mcs-loading {
    text-align: center;
    padding: 40px;
    color: #5f6368;
}
.mcs-loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--mcs-blue);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.mcs-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}
.mcs-btn-primary {
    float: right;
    background: var(--mcs-blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,159,227,0.2);
}
.mcs-btn-primary:hover {
    background: var(--mcs-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,159,227,0.3);
}
.mcs-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}
.mcs-btn-secondary {
    float: left;
    background: #f1f3f4;
    color: #202124;
}
.mcs-btn-secondary:hover {
    background: #e8eaed;
}
#mcs-review-container {
    margin: 20px 0;
}
.mcs-review-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e8eaed;
}
.mcs-review-item:last-child {
    border-bottom: none;
}
.mcs-review-item .mcs-review-name {
    font-weight: 500;
    flex: 1;
}
.mcs-review-item .mcs-review-hours {
    color: #5f6368;
    font-size: 14px;
    margin: 0 16px;
}
.mcs-review-item .mcs-review-price {
    font-weight: 600;
}
.mcs-total-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 24px;
    margin-top: 20px;
}
.mcs-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 18px;
}
.mcs-total-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--mcs-blue);
}
@media (max-width: 768px) {
    .mcs-step-content.active {
        margin-bottom: 20px;
    }
    .mcs-container {
        padding: 16px;
        margin: 20px 10px;
    }
    .mcs-step-label {
        font-size: 11px;
    }
    .mcs-step-number {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .mcs-steps::before {
        top: 18px;
        left: 20px;
        right: 20px;
    }
    .mcs-step-content-inner {
        padding: 20px 16px;
        margin: 0 -8px;
    }
    .mcs-step-content-inner h2 {
        font-size: 22px;
    }
    .mcs-search-toggle {
        font-size: 14px;
        height: 46px;
        padding: 10px 14px;
    }
    .mcs-dropdown-container {
        max-height: 280px;
    }
    .mcs-dropdown-list {
        max-height: 180px;
    }
    .mcs-course-item {
        flex-wrap: wrap;
    }
    .mcs-course-price {
        margin-left: 36px;
        margin-top: 4px;
    }
    .mcs-btn {
        width: 100%;
        justify-content: center;
        padding: 14px;
    }
    #mcs-course-summary {
        flex-direction: column;
        gap: 8px;
    }
    .mcs-review-item {
        flex-wrap: wrap;
        gap: 4px;
    }
    .mcs-review-item .mcs-review-hours {
        margin: 0 16px 0 0;
    }
}