<!-- start Simple Custom CSS and JS -->
<style type="text/css">
/* Saskatchewan Calculator Container */
.calculator-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    position: relative;
}

/* Header Styles */
.calculator-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calculator-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #B22222;
    margin-bottom: 15px;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.1rem;
    color: black;
    font-weight: 400;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #B22222 0%, #D63747 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 12.5%; /* 1/8 steps = 12.5% */
}

.progress-text {
    text-align: center;
    font-size: 1.2rem;
    color: white;
    font-weight: 500;
}

/* Score Container */
.score-container {
    position: fixed;
    top: 120px;
    right: 30px;
    z-index: 100;
}

.score-circle {
    width: 120px;
    height: 120px;
    border: 4px solid #B22222;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    position: relative;
}

.score-number {
    font-size: 2rem;
    font-weight: 700;
    color: #B22222;
    line-height: 1;
}

.score-total {
    font-size: 1rem;
    color: #6C757D;
    font-weight: 500;
}

/* Form Styles */
.calculator-form {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.form-step h2 {
    font-size: 1.8rem;
    color: #B22222;
    margin-bottom: 25px;
    font-weight: 600;
    border-bottom: 2px solid #B22222;
    padding-bottom: 15px;
}

.step-description {
    font-size: 1rem;
    color: #6C757D;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Form Groups */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 30px;
}

.form-group.half-width {
    flex: 0 0 calc(50% - 10px);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2C3E50;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #DEE2E6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #B22222;
    box-shadow: 0 0 0 3px rgba(178, 34, 34, 0.1);
}

.form-group input::placeholder {
    color: #adb5bd;
}

/* Phone Input */
.phone-input {
    display: flex;
    gap: 10px;
}

.phone-input input:first-child {
    flex: 0 0 80px;
    text-align: center;
    font-weight: 600;
}

.phone-input input:last-child {
    flex: 1;
}

/* Help Text */
.help-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

/* Summary Section */
.summary-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #B22222;
}

.summary-section h3 {
    color: #B22222;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.score-item.factor-total {
    background: #e3f2fd;
    font-weight: 600;
    border-color: #B22222;
}

.score-item.total {
    background: #B22222;
    color: white;
    font-size: 1.1rem;
}

/* Review Section */
.review-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #B22222;
}

.review-section h3 {
    color: #B22222;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.important-note {
    background: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin-top: 25px;
}

.important-note h4 {
    color: #856404;
    margin-bottom: 15px;
}

.important-note ul {
    margin: 0;
    padding-left: 20px;
}

.important-note li {
    margin-bottom: 8px;
    color: #856404;
}

/* Checkbox Styling */
input[type="checkbox"] {
    width: auto !important;
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #B22222;
}

.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
}

/* Points Display */
.points-display {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #B22222;
}

.points-label {
    font-weight: 600;
    color: #2C3E50;
}

.points-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #B22222;
    min-width: 30px;
}

.view-table-btn {
    background: #B22222;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.view-table-btn:hover {
    background: #8B1A1A;
    transform: translateY(-1px);
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid #B22222;
}

.form-navigation button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

#prevBtn {
    background: #6c757d;
    color: white;
}

#prevBtn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

#nextBtn, #calculateBtn {
    background: #B22222;
    color: white;
}

#nextBtn:hover, #calculateBtn:hover {
    background: #8B1A1A;
    transform: translateY(-1px);
}

#prevBtn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-50px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: 700;
    color: #adb5bd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: #B22222;
}

/* Result Modal */
.result-modal-content {
    text-align: center;
    max-width: 600px;
}

.result-modal-content h2 {
    color: #B22222;
    margin-bottom: 30px;
    font-size: 2rem;
}

.result-score {
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, #B22222 0%, #D63747 100%);
    color: white;
    border-radius: 12px;
    display: inline-block;
    min-width: 200px;
}

.result-number {
    font-size: 3rem;
    font-weight: 700;
    display: block;
}

.result-total {
    font-size: 1.5rem;
    opacity: 0.9;
}

.result-message {
    margin: 30px 0;
    padding: 25px;
    border-radius: 8px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.result-message.eligible {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-message.not-eligible {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.result-message ul {
    text-align: left;
    margin: 15px 0;
    padding-left: 20px;
}

.result-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-primary, .btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.btn-primary {
    background: #B22222;
    color: white;
}

.btn-primary:hover {
    background: #8B1A1A;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Points Tables */
.points-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
}

.points-table th,
.points-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #DEE2E6;
}

.points-table th {
    background: #B22222;
    color: white !important;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.points-table tr:hover {
    background: #f8f9fa;
}

.points-table td:last-child {
    text-align: center;
    font-weight: 600;
    color: #B22222;
}

/* Saskatchewan Contact Form Styling */
#saskatchewan-contact-form {
    background: rgba(255, 255, 255, 0.98);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin: 40px auto;
    max-width: 700px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border: 2px solid #B22222;
    display: none;
    position: relative;
    z-index: 10;
}

#saskatchewan-contact-form h2 {
    color: #B22222;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 700;
}

#saskatchewan-contact-form p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Saskatchewan Form Container Styling */
.saskatchewan-form-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.saskatchewan-form-container h3 {
    color: #B22222;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

/* Contact Form 7 field styling */
#saskatchewan-contact-form .wpcf7-form {
    text-align: center;
}

#saskatchewan-contact-form .wpcf7-form-control-wrap {
    display: block;
    margin: 20px auto;
    max-width: 500px;
    text-align: center;
    position: relative;
}

/* Form Row Styling - CENTERED WITH LABELS ABOVE */
#saskatchewan-contact-form .form-row {
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Labels above each field - CENTERED */
#saskatchewan-contact-form .form-row:has(input[name="full-name"])::before {
    content: "Full Legal Name *";
    display: block;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 5px;
    font-size: 1rem;
    text-align: center;
    width: 100%;
}

#saskatchewan-contact-form .form-row:has(input[name="email-address"])::before {
    content: "Email Address *";
    display: block;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 5px;
    font-size: 1rem;
    text-align: center;
    width: 100%;
}

#saskatchewan-contact-form .form-row:has(input[name="phone"])::before {
    content: "Phone Number";
    display: block;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 5px;
    font-size: 1rem;
    text-align: center;
    width: 100%;
}

#saskatchewan-contact-form .form-row:has(input[name="citizenship"])::before {
    content: "Country of Citizenship";
    display: block;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 5px;
    font-size: 1rem;
    text-align: center;
    width: 100%;
}

#saskatchewan-contact-form .form-row:has(textarea[name="consultation-request"])::before {
    content: "Additional Questions or Comments";
    display: block;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 5px;
    font-size: 1rem;
    text-align: center;
    width: 100%;
}

/* Input Field Styling for Saskatchewan Form - CENTERED */
#saskatchewan-contact-form input[type="text"],
#saskatchewan-contact-form input[type="email"],
#saskatchewan-contact-form input[type="tel"],
#saskatchewan-contact-form textarea {
    width: 100% !important;
    max-width: 500px;
    margin: 0 auto;
    padding: 15px 20px;
    border: 2px solid #B22222 !important;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    display: block;
    background: white !important;
    color: #333 !important;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Focus states */
#saskatchewan-contact-form input[type="text"]:focus,
#saskatchewan-contact-form input[type="email"]:focus,
#saskatchewan-contact-form input[type="tel"]:focus,
#saskatchewan-contact-form textarea:focus {
    border-color: #8B1A1A !important;
    box-shadow: 0 0 0 3px rgba(178, 34, 34, 0.2) !important;
    outline: none !important;
    background: #fafafa !important;
}

/* Textarea specific styling */
#saskatchewan-contact-form textarea[name="consultation-request"] {
    text-align: left;
    min-height: 120px;
    resize: vertical;
    color: #333 !important;
    max-width: 500px;
    margin: 0 auto;
    display: block;
}

#saskatchewan-contact-form textarea[name="consultation-request"]::placeholder {
    color: #888 !important;
    font-style: italic;
}

/* Character Counter Styling */
.character-counter {
    text-align: center;
    margin: 5px auto 15px;
    font-size: 0.85rem;
    color: #666;
    max-width: 500px;
}

.character-counter.warning {
    color: #dc3545;
    font-weight: 600;
}

.character-counter.over-limit {
    color: #dc3545;
    font-weight: 700;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Score Display Styling */
.score-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #B22222;
    border-radius: 12px;
    padding: 25px;
    margin: 30px auto;
    text-align: center;
    max-width: 400px;
    overflow: hidden;
}

.score-display h4 {
    color: #B22222;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
}

#display-score {
    font-family: 'Arial', sans-serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Submit Button Styling */
#saskatchewan-contact-form input[type="submit"],
#saskatchewan-contact-form .btn-submit {
    background: #B22222 !important;
    color: white !important;
    padding: 15px 25px;
    border: 2px solid #B22222 !important;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 30px auto 10px;
    display: block;
    width: auto;
    min-width: 280px;
    max-width: 90%;
    text-align: center;
    white-space: normal;
    line-height: 1.3;
    height: auto;
}

#saskatchewan-contact-form input[type="submit"]:hover,
#saskatchewan-contact-form .btn-submit:hover {
    background: white !important;
    color: #B22222 !important;
    border-color: #B22222 !important;
    transform: translateY(-2px);
}

/* Acceptance Checkbox Styling */
#saskatchewan-contact-form .wpcf7-acceptance {
    text-align: center;
    margin: 20px auto;
    max-width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#saskatchewan-contact-form .wpcf7-acceptance input[type="checkbox"] {
    width: auto !important;
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #B22222;
}

#saskatchewan-contact-form .wpcf7-acceptance label {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    color: #2C3E50;
    cursor: pointer;
    line-height: 1.4;
    text-align: center;
}

/* Hidden fields */
#saskatchewan-contact-form input[type="hidden"] {
    display: none !important;
}

/* Placeholder styling */
#saskatchewan-contact-form input::placeholder,
#saskatchewan-contact-form textarea::placeholder {
    color: #888 !important;
    font-style: italic;
    opacity: 0.8;
}

/* Animation when form appears */
#saskatchewan-contact-form.show {
    display: block;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Form 7 validation styling */
#saskatchewan-contact-form .wpcf7-not-valid {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

#saskatchewan-contact-form .wpcf7-validation-errors {
    color: #dc3545;
    background: #fff5f5;
    border: 1px solid #dc3545;
    border-radius: 5px;
    padding: 10px;
    margin: 15px auto;
    max-width: 500px;
    text-align: center;
}

/* Success message styling */
#saskatchewan-contact-form .wpcf7-mail-sent-ok {
    color: #155724 !important;
    background: #d4edda !important;
    border: 1px solid #c3e6cb !important;
    border-radius: 5px !important;
    padding: 15px !important;
    margin: 15px auto !important;
    max-width: 500px !important;
    text-align: center !important;
    font-weight: 600 !important;
    display: block !important;
}

/* Contact Form 7 Response Output */
#saskatchewan-contact-form .wpcf7-response-output {
    display: block !important;
    margin: 15px auto !important;
    text-align: center !important;
    max-width: 500px !important;
}

/* Loading spinner */
#saskatchewan-contact-form .wpcf7-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #B22222;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    display: block !important;
}

/* General form field containers */
#saskatchewan-contact-form .wpcf7-form-control-wrap {
    margin-bottom: 15px;
    text-align: center;
}

/* Force center alignment for all CF7 elements */
#saskatchewan-contact-form .wpcf7-form p {
    text-align: center;
    margin: 20px auto;
}

#saskatchewan-contact-form .wpcf7-form br {
    display: none;
}

/* Remove unwanted elements */
#saskatchewan-contact-form::after,
#saskatchewan-contact-form .wpcf7-form::after,
.saskatchewan-form-container::after {
    display: none !important;
}

.wpcf7 .screen-reader-response {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-container {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .calculator-header {
        padding: 30px 15px;
    }
    
    .calculator-header h1 {
        font-size: 2rem;
    }
    
    .calculator-form {
        padding: 25px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half-width {
        flex: 1;
    }
    
    .score-container {
        position: static;
        margin: 20px auto;
        width: fit-content;
    }
    
    .phone-input {
        flex-direction: row;
        gap: 10px;
    }
    
    .phone-input input:first-child {
        flex: 0 0 70px;
    }
    
    .phone-input input:last-child {
        flex: 1;
    }
    
    .result-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .points-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .score-breakdown {
        gap: 10px;
    }

    .score-item {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    /* Mobile contact form adjustments */
    #saskatchewan-contact-form {
        padding: 25px;
        margin: 20px auto;
        max-width: 95%;
    }

    .saskatchewan-form-container {
        max-width: 100%;
    }

    #saskatchewan-contact-form input[type="text"],
    #saskatchewan-contact-form input[type="email"],
    #saskatchewan-contact-form input[type="tel"],
    #saskatchewan-contact-form textarea {
        max-width: 100%;
        padding: 12px 15px;
    }

    .score-display {
        padding: 20px;
        margin: 20px auto;
    }

    #saskatchewan-contact-form .form-row {
        margin-bottom: 15px;
    }

    #saskatchewan-contact-form .wpcf7-form-control-wrap {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .calculator-header h1 {
        font-size: 1.7rem;
    }
    
    .calculator-form {
        padding: 20px;
    }
    
    .form-step h2 {
        font-size: 1.5rem;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-number {
        font-size: 1.7rem;
    }
    
    .result-number {
        font-size: 2.5rem;
    }

    .score-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 10px;
    }

    #saskatchewan-contact-form {
        padding: 20px;
    }

    .saskatchewan-form-container h3 {
        font-size: 1.4rem;
    }

    #saskatchewan-contact-form input[type="submit"],
    #saskatchewan-contact-form .btn-submit {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 200px;
        max-width: 95%;
    }

    .score-display {
        padding: 15px 10px;
        margin: 15px auto;
        max-width: 95%;
    }

    .score-display h4 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    #display-score {
        font-size: 0.85rem;
    }

    #display-score div:first-child {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }
}

/* Animation for score updates */
.score-update {
    animation: scoreUpdate 0.5s ease;
}

@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #B22222;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}</style>
<!-- end Simple Custom CSS and JS -->
