/* HSP Test Plugin Styles */
#hsp-test-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.hsp-test-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* User Info Section */
.hsp-user-info {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.hsp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 15px;
    align-items: center;
}

.hsp-col {
    display: flex;
    align-items: center;
}

.hsp-form-control {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.hsp-form-control:focus {
    outline: none;
    border-color: var(--hsp-primary-color, #99cc00);
    box-shadow: 0 0 0 3px rgba(153, 204, 0, 0.1);
}

/* Ensure email and number inputs have identical styling */
input[type="email"].hsp-form-control,
input[type="number"].hsp-form-control {
    padding: 10px 15px;
    height: auto;
    line-height: normal;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

/* Remove number input spinners */
input[type="number"].hsp-form-control::-webkit-outer-spin-button,
input[type="number"].hsp-form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Radio Button Styles */
.hsp-radio {
    display: block;
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.4;
    user-select: none;
}

.hsp-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.hsp-checkround {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid var(--hsp-primary-color, #99cc00);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.hsp-radio input:checked ~ .hsp-checkround {
    background-color: #fff;
}

.hsp-checkround:after {
    content: "";
    position: absolute;
    display: none;
}

.hsp-radio input:checked ~ .hsp-checkround:after {
    display: block;
}

.hsp-radio .hsp-checkround:after {
    left: 2px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--hsp-primary-color, #99cc00);
}

/* Checkbox Styles */
.hsp-check {
    display: block;
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.4;
    user-select: none;
}

.hsp-check input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.hsp-checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid var(--hsp-primary-color, #99cc00);
    transition: all 0.3s ease;
}

.hsp-check input:checked ~ .hsp-checkmark {
    background-color: #fff;
}

.hsp-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.hsp-check input:checked ~ .hsp-checkmark:after {
    display: block;
}

.hsp-check .hsp-checkmark:after {
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid var(--hsp-primary-color, #99cc00);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Table Styles */
.hsp-table-wrapper {
    overflow-x: auto;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.hsp-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.hsp-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.hsp-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--hsp-primary-color, #99cc00);
    border-radius: 4px;
}

.hsp-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #7aa000;
}

.hsp-table-wrapper::before {
    content: "← Scrollen Sie horizontal für alle Spalten →";
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 12px;
    color: #666;
    font-style: italic;
    z-index: 10;
}

.hsp-questions-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.hsp-questions-table th,
.hsp-questions-table td {
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
    white-space: nowrap;
}

.hsp-questions-table th:first-child,
.hsp-questions-table td:first-child {
    width: 40px;
    min-width: 40px;
}

.hsp-questions-table th:nth-child(2),
.hsp-questions-table td:nth-child(2) {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    text-align: left;
    padding: 12px 15px;
    white-space: normal;
    word-wrap: break-word;
}

.hsp-questions-table th:nth-child(n+3):nth-child(-n+9),
.hsp-questions-table td:nth-child(n+3):nth-child(-n+9) {
    width: 80px;
    min-width: 80px;
}

.hsp-questions-table th:last-child,
.hsp-questions-table td:last-child {
    width: 120px;
    min-width: 120px;
}

.hsp-header-main {
    background-color: var(--hsp-primary-color, #99cc00) !important;
    color: #fff !important;
}

.hsp-header-sub {
    background-color: #ccc !important;
    color: var(--hsp-primary-color, #99cc00) !important;
    font-size: 12px;
}

.hsp-header-sub th {
    font-weight: 600;
    padding: 8px 4px;
}

.hsp-questions-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.hsp-questions-table tbody tr:hover {
    background-color: #e8f5e8;
}

.hsp-question-text {
    font-weight: 500;
    line-height: 1.4;
}

/* Button Styles */
.hsp-submit-btn,
.hsp-next-btn,
.hsp-back-btn {
    background-color: var(--hsp-button-color, #99cc00);
    color: #fff;
    border: 2px solid var(--hsp-button-color, #99cc00);
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.hsp-submit-btn:hover,
.hsp-next-btn:hover,
.hsp-back-btn:hover {
    background-color: #fff;
    color: var(--hsp-button-color, #99cc00);
    border-color: var(--hsp-button-color, #99cc00);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(153, 204, 0, 0.3);
}

.hsp-submit-btn:active,
.hsp-next-btn:active,
.hsp-back-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(153, 204, 0, 0.2);
}

.hsp-submit-wrapper {
    text-align: center;
    margin-top: 30px;
}

/* Mobile Navigation */
.hsp-mobile-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 15px;
}

.hsp-mobile-navigation .hsp-back-btn {
    background-color: #6c757d;
    border-color: #6c757d;
}

.hsp-mobile-navigation .hsp-back-btn:hover {
    background-color: #fff;
    color: #6c757d;
    border-color: #6c757d;
}

/* Mobile Question Slides */
.hsp-mobile-questions {
    margin-bottom: 20px;
}

.hsp-question-slide {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.hsp-question-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.4;
}

/* Results Display */
.hsp-results {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

.hsp-results-content h3 {
    color: var(--hsp-primary-color, #99cc00);
    font-size: 28px;
    margin-bottom: 15px;
}

.hsp-results-content h4 {
    color: #333;
    font-size: 22px;
    margin-bottom: 20px;
}

.hsp-results-content div {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Loading Indicator */
.hsp-loading {
    text-align: center;
    padding: 40px 20px;
    font-size: 18px;
    color: var(--hsp-primary-color, #99cc00);
}

.hsp-loading p {
    margin: 0;
    font-weight: 600;
}

/* Responsive Design */
@media screen and (min-width: 1024px) {
    .hsp-mobile-version {
        display: none;
    }
    
    .hsp-desktop-version {
        display: block;
    }
}

@media screen and (max-width: 1023px) {
    .hsp-desktop-version {
        display: none;
    }
    
    .hsp-mobile-version {
        display: block;
    }
    
    .hsp-form-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .hsp-form-row .hsp-col:first-child {
        grid-column: 1 / -1;
    }
    
    .hsp-form-row .hsp-col:nth-child(2) {
        grid-column: 1 / -1;
    }
    
    .hsp-col {
        width: 100%;
    }
    
    .hsp-mobile-navigation {
        flex-direction: column;
    }
    
    .hsp-mobile-navigation button {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media screen and (max-width: 768px) {
    .hsp-test-wrapper {
        padding: 15px;
    }
    
    .hsp-user-info {
        padding: 15px;
    }
    
    .hsp-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .hsp-questions-table {
        min-width: 900px;
    }
    
    .hsp-questions-table th,
    .hsp-questions-table td {
        padding: 8px 4px;
        font-size: 14px;
    }
    
    .hsp-questions-table th:nth-child(2),
    .hsp-questions-table td:nth-child(2) {
        width: 250px;
        min-width: 250px;
        max-width: 250px;
        padding: 8px 10px;
    }
    
    .hsp-questions-table th:nth-child(n+3):nth-child(-n+9),
    .hsp-questions-table td:nth-child(n+3):nth-child(-n+9) {
        width: 60px;
        min-width: 60px;
    }
    
    .hsp-questions-table th:last-child,
    .hsp-questions-table td:last-child {
        width: 100px;
        min-width: 100px;
    }
    
    .hsp-header-sub {
        font-size: 10px;
    }
    
    .hsp-radio,
    .hsp-check {
        font-size: 14px;
    }
    
    .hsp-question-title {
        font-size: 16px;
    }
}

/* Animation for smooth transitions */
.hsp-question-slide {
    transition: opacity 0.3s ease-in-out;
}

.hsp-question-slide[style*="display: none"] {
    opacity: 0;
}

.hsp-question-slide[style*="display: block"] {
    opacity: 1;
}

/* Focus styles for accessibility */
.hsp-radio input:focus + .hsp-checkround,
.hsp-check input:focus + .hsp-checkmark {
    box-shadow: 0 0 0 3px rgba(153, 204, 0, 0.3);
}

/* Error states */
.hsp-form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Success states */
.hsp-form-control.success {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
} 