/**
 * Public-facing styles
 */
.sne-form-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.sne-form-wrapper {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.sne-form-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

/* Progress Bar */
.sne-progress-bar {
    margin-bottom: 40px;
}

.sne-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    position: relative;
}

.sne-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.sne-step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.sne-step.active .sne-step-number {
    background: #fd363b;
    color: #fff;
}

.sne-step-label {
    display: block;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.sne-progress-line {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    z-index: 1;
}

.sne-progress-fill {
    height: 100%;
    background: #fd363b;
    transition: width 0.3s ease;
    width: 0%;
}

/* Form Steps */
.sne-step-content {
    display: none;
}

.sne-step-content.active {
    display: block;
}

.sne-step-title {
    font-size: 22px;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
}

/* Form Elements */
.sne-form-group {
    margin-bottom: 20px;
}

.sne-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .sne-form-row {
        grid-template-columns: 1fr;
    }
}

.sne-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.sne-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.sne-form-control:focus {
    outline: none;
    border-color: #fd363b;
    box-shadow: 0 0 0 3px rgba(253, 54, 59, 0.1);
}

.sne-form-control.error {
    border-color: #d63638;
}

.sne-form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.sne-form-hint.sne-warning {
    color: #f56e28;
}

.sne-optional {
    font-weight: normal;
    color: #999;
    font-size: 12px;
}

/* Radio & Checkbox */
.sne-radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sne-radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px; /* Minimum touch target size */
}

.sne-radio-option:hover {
    border-color: #fd363b;
    background: #fff3f3;
}

.sne-radio-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.sne-radio-option input[type="radio"]:checked + .sne-radio-label,
.sne-radio-option input[type="radio"]:checked ~ span {
    color: #fd363b;
    font-weight: 600;
}

.sne-radio-option:has(input[type="radio"]:checked) {
    border-color: #fd363b;
    background: #fff3f3;
}

.sne-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sne-checkbox-option {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px; /* Minimum touch target size */
}

.sne-checkbox-option:hover {
    background: #f9f9f9;
}

.sne-checkbox-option input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    cursor: pointer;
}

.sne-checkbox-option input[type="checkbox"]:checked ~ span {
    color: #fd363b;
    font-weight: 500;
}

/* File Upload */
.sne-file-upload-area {
    position: relative;
    cursor: pointer;
}

.sne-file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sne-file-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
}

.sne-file-drop-zone:hover,
.sne-file-drop-zone.dragover {
    border-color: #fd363b;
    background: #fff3f3;
}

.sne-file-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.sne-file-drop-zone p {
    margin: 10px 0;
    color: #333;
    font-weight: 500;
}

.sne-file-drop-zone small {
    color: #999;
    font-size: 12px;
}

.sne-file-preview {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sne-file-item {
    position: relative;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 200px;
}

.sne-file-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.sne-file-name {
    flex: 1;
    font-size: 12px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sne-file-size {
    font-size: 11px;
    color: #999;
}

.sne-file-remove {
    background: #d63638;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.3s ease;
}

.sne-file-remove:hover {
    background: #b52729;
}

/* Buttons */
.sne-form-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.sne-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px; /* Minimum touch target size */
}

.sne-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sne-btn-primary {
    background: #fd363b;
    color: #fff;
}

.sne-btn-primary:hover:not(:disabled) {
    background: #d72328;
}

.sne-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.sne-btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
}

.sne-btn-loader {
    display: inline-block;
}

/* Notices */
.sne-upload-notice {
    background: #fff3f3;
    border-left: 4px solid #fd363b;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.sne-upload-notice.sne-info {
    background: #f9f9f9;
    border-left-color: #999;
}

.sne-upload-notice p {
    margin: 0;
    color: #333;
    font-size: 14px;
}

/* Messages */
.sne-success-message,
.sne-error-message {
    text-align: center;
    padding: 40px;
    border-radius: 8px;
    margin-top: 20px;
}

.sne-success-message {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.sne-error-message {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.sne-success-icon,
.sne-error-icon {
    font-size: 60px;
    margin-bottom: 15px;
    display: block;
}

.sne-success-icon {
    color: #28a745;
}

.sne-error-icon {
    color: #dc3545;
}

.sne-success-message h3,
.sne-error-message h3 {
    margin-bottom: 15px;
    font-size: 24px;
}

.sne-success-text,
.sne-error-text {
    font-size: 16px;
    margin-bottom: 10px;
}

.sne-success-id {
    font-weight: 600;
    font-size: 18px;
    margin-top: 10px;
}

/* Quick Form */
.sne-form-quick {
    max-width: 600px;
}

.sne-form-quick .sne-form-wrapper {
    padding: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .sne-form-container {
        margin: 20px auto;
        padding: 10px;
    }
    
    .sne-form-wrapper {
        padding: 20px 15px;
        border-radius: 6px;
    }
    
    .sne-form-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    /* Progress Bar - Mobile Optimized */
    .sne-progress-bar {
        margin-bottom: 30px;
        overflow: hidden;
        position: relative;
    }
    
    .sne-progress-steps {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 8px;
        padding-bottom: 10px;
        margin-bottom: 15px;
        position: relative;
    }
    
    .sne-progress-steps::-webkit-scrollbar {
        display: none;
    }
    
    /* Scroll gradient hint on mobile */
    .sne-progress-steps::after {
        content: '';
        position: sticky;
        right: 0;
        top: 0;
        width: 20px;
        height: 100%;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.95));
        pointer-events: none;
        flex-shrink: 0;
    }
    
    .sne-step {
        flex: 0 0 auto;
        min-width: 80px;
        max-width: 80px;
        display: flex;
        flex-direction: column;
        align-items: center;
        scroll-snap-align: start;
        position: relative;
    }
    
    .sne-step-number {
        width: 36px;
        height: 36px;
        line-height: 36px;
        font-size: 14px;
        margin-bottom: 6px;
        flex-shrink: 0;
    }
    
    .sne-step-label {
        font-size: 10px;
        line-height: 1.2;
        text-align: center;
        word-break: break-word;
    }
    
    .sne-progress-line {
        display: none;
    }
    
    /* Show mini progress indicator below steps */
    .sne-progress-bar::after {
        content: '';
        display: block;
        height: 3px;
        background: #e0e0e0;
        border-radius: 2px;
        position: relative;
        margin-top: 5px;
    }
    
    .sne-step-title {
        font-size: 18px;
        margin-bottom: 20px;
        line-height: 1.3;
    }
    
    /* Form Elements */
    .sne-form-group {
        margin-bottom: 18px;
    }
    
    .sne-form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .sne-form-control {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 5px;
    }
    
    /* Radio Options - Mobile Stack */
    .sne-radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .sne-radio-option {
        min-width: auto;
        padding: 12px 15px;
        font-size: 15px;
    }
    
    /* File Upload */
    .sne-file-drop-zone {
        padding: 25px 15px;
    }
    
    .sne-file-icon {
        font-size: 36px;
    }
    
    .sne-file-drop-zone p {
        font-size: 14px;
        margin: 8px 0;
    }
    
    .sne-file-drop-zone small {
        font-size: 11px;
    }
    
    .sne-file-item {
        max-width: 100%;
        width: 100%;
        flex: 1 1 auto;
    }
    
    .sne-file-preview {
        flex-direction: column;
        gap: 8px;
    }
    
    .sne-file-remove {
        min-width: 32px;
        min-height: 32px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    /* Buttons */
    .sne-form-actions {
        flex-direction: column-reverse; /* Submit button on top */
        gap: 12px;
        margin-top: 25px;
        padding-top: 20px;
        position: sticky;
        bottom: 0;
        background: #fff;
        padding-bottom: 10px;
        margin-bottom: -10px;
    }
    
    .sne-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        border-radius: 5px;
    }
    
    /* Notices */
    .sne-upload-notice {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .sne-upload-notice p {
        font-size: 13px;
    }
    
    /* Messages */
    .sne-success-message,
    .sne-error-message {
        padding: 30px 20px;
        margin-top: 15px;
    }
    
    .sne-success-icon,
    .sne-error-icon {
        font-size: 48px;
        margin-bottom: 12px;
    }
    
    .sne-success-message h3,
    .sne-error-message h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .sne-success-text,
    .sne-error-text {
        font-size: 14px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .sne-form-container {
        margin: 10px auto;
        padding: 5px;
    }
    
    .sne-form-wrapper {
        padding: 15px 12px;
    }
    
    .sne-form-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .sne-step-number {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 13px;
    }
    
    .sne-step-label {
        font-size: 9px;
    }
    
    .sne-step {
        min-width: 70px;
        max-width: 70px;
    }
    
    .sne-step-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .sne-form-control {
        padding: 10px;
        font-size: 16px;
    }
    
    .sne-radio-option {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .sne-file-drop-zone {
        padding: 20px 12px;
    }
    
    .sne-file-icon {
        font-size: 32px;
    }
    
    .sne-btn {
        padding: 12px 18px;
        font-size: 15px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .sne-progress-steps {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    
    .sne-progress-line {
        display: block;
    }
    
    .sne-progress-bar::after {
        display: none;
    }
}

/* Quick Form Mobile Optimizations */
@media (max-width: 768px) {
    .sne-form-quick .sne-form-wrapper {
        padding: 20px 15px;
    }
    
    .sne-form-quick .sne-form-title {
        font-size: 22px;
    }
}

/* Touch and Interaction Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Styles for touch devices */
    .sne-radio-option:hover {
        border-color: #e0e0e0;
        background: transparent;
    }
    
    .sne-radio-option:active {
        border-color: #fd363b;
        background: #fff3f3;
    }
    
    .sne-checkbox-option:hover {
        background: transparent;
    }
    
    .sne-checkbox-option:active {
        background: #f9f9f9;
    }
    
    .sne-file-drop-zone:hover {
        border-color: #ccc;
        background: #fafafa;
    }
    
    .sne-file-drop-zone:active,
    .sne-file-drop-zone.dragover {
        border-color: #fd363b;
        background: #fff3f3;
    }
}

/* Improve scrolling on mobile */
@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Smooth scrolling */
    .sne-form-container {
        scroll-behavior: smooth;
    }
    
    /* Prevent horizontal scroll */
    .sne-form-wrapper {
        overflow-x: hidden;
    }
    
    /* Better input focus on mobile */
    .sne-form-control:focus {
        box-shadow: 0 0 0 2px rgba(253, 54, 59, 0.2);
    }
    
}

/* Tabs Form Styles */
.sne-form-tabs {
    max-width: 900px;
}

.sne-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.sne-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.sne-tab-btn:hover {
    background: #f9f9f9;
}

.sne-tab-btn.active {
    border-bottom-color: #fd363b;
    background: #fff3f3;
}

.sne-tab-icon {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 5px;
}

.sne-tab-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: block;
}

.sne-tab-desc {
    font-size: 12px;
    color: #666;
    display: block;
    line-height: 1.3;
}

.sne-tab-btn.active .sne-tab-label {
    color: #fd363b;
}

.sne-tabs-content {
    position: relative;
    min-height: 400px;
}

.sne-tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.sne-tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sne-form-quick-wrapper,
.sne-form-full-wrapper {
    padding-top: 20px;
}

.sne-form-full-wrapper .sne-form-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.sne-form-full-wrapper .sne-form-wrapper {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.sne-form-full-wrapper .sne-form-title {
    display: none;
}

/* Responsive Tabs */
@media (max-width: 768px) {
    .sne-tabs-nav {
        flex-direction: column;
        gap: 0;
        border-bottom: none;
    }
    
    .sne-tab-btn {
        border-bottom: 2px solid #e0e0e0;
        border-left: 3px solid transparent;
        border-right: none;
        padding: 15px;
        flex-direction: row;
        text-align: left;
        justify-content: flex-start;
    }
    
    .sne-tab-btn.active {
        border-bottom-color: #e0e0e0;
        border-left-color: #fd363b;
        background: #fff3f3;
    }
    
    .sne-tab-icon {
        font-size: 24px;
        margin-right: 12px;
        margin-bottom: 0;
    }
    
    .sne-tab-label {
        font-size: 16px;
    }
    
    .sne-tab-desc {
        font-size: 11px;
        margin-top: 2px;
    }
    
    .sne-tabs-content {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .sne-tab-btn {
        padding: 12px;
    }
    
    .sne-tab-icon {
        font-size: 20px;
        margin-right: 10px;
    }
    
    .sne-tab-label {
        font-size: 15px;
    }
    
    .sne-tab-desc {
        font-size: 10px;
    }
}

