/* Modern Signmax Order Form CSS */

.smof-order-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.smof-design-preview {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e5e5e5;
}

.smof-design-preview h2 {
    margin-top: 0;
    color: #23282d;
}

.smof-design-image {
    text-align: center;
    max-height: 500px;
}

.smof-design-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    background-color: #fff;
}

.smof-product-selection {
    margin-bottom: 30px;
}

.smof-product-selection h3 {
    color: #23282d;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.smof-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.smof-product-card {
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.smof-product-card:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.smof-product-card.active {
    border-color: #0073aa;
    background-color: #f0f8ff;
    border-width: 3px;
}

.smof-product-image {
    margin-bottom: 15px;
}

.smof-product-image img {
    max-width: 100%;
    height: 150px;
    object-fit: contain;
}

.smof-product-title {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #23282d;
    font-weight: 600;
}

.smof-product-description {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

.smof-size-selection {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #e5e5e5;
}

.smof-size-selection h3 {
    margin-top: 0;
    color: #23282d;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

.smof-size-selection h4 {
    margin: 20px 0 10px 0;
    color: #23282d;
    font-size: 1.1em;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 8px;
}




.smof-size-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    margin-top: 15px;
    align-items: start;
}

.smof-product-size-container {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.smof-size-input {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.smof-size-input label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
    display: block;
    width: 100%;
    /* text-align: center;*/
}

.smof-size-input input {
    width: 100%;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.smof-size-input.smof-size-unavailable label {
    color: #aaa;
    opacity: 0.7;
}

.smof-size-disabled {
    background-color: #f5f5f5;
    color: #aaa;
    cursor: not-allowed;
    border: 1px dashed #ccc;
}

/* Responsive Anpassungen für Größen-Grid */
@media (max-width: 1024px) {
    .smof-size-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .smof-size-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .smof-size-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.smof-upload-section {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #e5e5e5;

    & h3 {
        margin-top: 0;
        color: #23282d;
        padding-bottom: 10px;
        border-bottom: 2px solid #0073aa;
    }
}



.smof-file-upload {
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
}

.smof-file-upload input[type="file"] {
    display: none;
}

.smof-file-upload-label {
    display: block;
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    margin: 10px auto;
    width: fit-content;
}

.smof-file-info {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
}

.smof-customer-data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.smof-customer-section {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e5e5e5;

}

.smof-customer-section h3 {
    margin-top: 0;
    color: #23282d;
    font-size: 1.2em;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

.smof-form-field {
    margin-bottom: 20px;
}

.smof-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.smof-field-input,
.smof-field-select,
.smof-field-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.smof-field-input:focus,
.smof-field-select:focus,
.smof-field-textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

.smof-field-textarea {
    min-height: 120px;
    resize: vertical;
}

.smof-field-description {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.required {
    color: #d63638;
}

.smof-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.smof-col {
    display: flex;
    flex-direction: column;
}

.smof-additional-info {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #e5e5e5;

    & h3 {
        margin-top: 0;
        color: #23282d;
        padding-bottom: 10px;
        border-bottom: 2px solid #0073aa;
    }
}



.smof-form-submit {
    text-align: center;
    margin: 30px 0;
}

.smof-notice {
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.smof-notice-info {
    background: #d9edf7;
    border: 1px solid #bce8f1;
    color: #31708f;
}

.smof-notice-error {
    background: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
}

.smof-notice > p:last-child {
    margin-bottom: 0px;
}

.smof-hidden-fields {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .smof-order-form {
        padding: 10px;
    }

    .smof-customer-data {
        grid-template-columns: 1fr;
    }

    .smof-row {
        grid-template-columns: 1fr;
    }
}

/* Kompakte horizontale Auswahl-Buttons wenn nur eine Spalte passt */
@media (max-width: 600px) {
    .smof-product-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .smof-product-card {
        display: grid;
        grid-template-columns: 50px 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 10px;
        row-gap: 2px;
        padding: 6px 10px;
        text-align: left;
    }

    .smof-product-card:hover {
        transform: none;
    }

    .smof-product-image {
        grid-column: 1;
        grid-row: 1 / span 2;
        margin-bottom: 0;
    }

    .smof-product-image img {
        height: 44px;
    }

    .smof-product-title {
        grid-column: 2;
        grid-row: 1;
        font-size: 0.95em;
        margin-bottom: 0;
        line-height: 1.2;
    }

    .smof-product-title h4 {
        margin: 0;
    }

    .smof-product-description {
        grid-column: 2;
        grid-row: 2;
        font-size: 0.75em;
        line-height: 1.25;
    }

    .smof-product-description p {
        margin: 0;
    }
}

/* Review Container Styles */
#smof-order-review-container {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow-y: auto;

    & .smof-order-review {
        max-width: 1000px;
        margin: 40px auto;
        padding: 30px;
        background: white;
        border-radius: 8px;
        padding: 30px;
        border-radius: 8px;

        & h2 {
            color: #23282d;
            margin-top: 0;
        }

    }


}

.smof-review-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e5e5e5;

    & h3 {
        margin-top: 0;
        color: #23282d;
        padding-bottom: 10px;
        border-bottom: 2px solid #0073aa;
    }
}

.smof-review-customer-column h4 {
    margin-top: 0;
    color: #444;
}

.smof-review-size-group, .smof-review-customer-column {
    padding: 15px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e5e5e5;

    & h4 {
        margin-top: 0;
        color: #444;
        font-size: 1.1em;
    }
}



/* WordPress Admin Theme Integration */
.wp-admin .smof-order-form {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wp-admin .smof-field-input,
.wp-admin .smof-field-select,
.wp-admin .smof-field-textarea {
    box-sizing: border-box;
}

/* Button Styles */
.smof-order-form .button {
    background: #2271b1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.smof-order-form .button:hover {
    background: #19588c;
}

.smof-order-form .button.primary {
    background: #0073aa;
}

.smof-order-form .button.primary:hover {
    background: #005177;
}

.smof-order-form .button.secondary {
    background: #f3f3f3;
    color: #333;
    border: 1px solid #ddd;
}

.smof-order-form .button.secondary:hover {
    background: #e5e5e5;
}

/* Loading Spinner */
.smof-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Product Type Specific Styles */
.smof-product-type-radtrikot {
    border-left: 4px solid #0073aa;
}

.smof-product-type-laufshirt {
    border-left: 4px solid #2271b1;
}

.smof-product-type-freeride {
    border-left: 4px solid #135e96;
}

/* Landing Page */
.smof-landing-hero {
    text-align: center;
    background: #f0f6fc;
    border-radius: 8px;
    padding: 40px 20px;
    margin-bottom: 24px;
}

.smof-landing-hero h2 {
    font-size: 1.8em;
    margin: 0 0 12px;
    color: #1d2327;
}

.smof-landing-hero p {
    color: #50575e;
    font-size: 1.1em;
    margin: 0 0 20px;
}

.smof-landing-cards {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.smof-landing-card {
    flex: 1;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
}

.smof-landing-card h3 {
    margin-top: 0;
}

.smof-landing-steps {
    list-style: none;
    padding: 0;
    counter-reset: steps;
}

.smof-landing-steps li {
    counter-increment: steps;
    padding: 8px 0 8px 36px;
    position: relative;
}

.smof-landing-steps li::before {
    content: counter(steps);
    position: absolute;
    left: 0;
    width: 26px;
    height: 26px;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 26px;
    font-weight: bold;
    font-size: 0.85em;
}

@media (max-width: 768px) {
    .smof-landing-cards {
        flex-direction: column;
    }

    .smof-landing-hero {
        padding: 24px 16px;
    }
}

/* Success / Dankes-Seite */
.smof-success-page {
    text-align: center;
    background: #f0f6fc;
    border-radius: 8px;
    padding: 60px 20px;
    margin: 20px 0;
}

.smof-success-icon {
    width: 64px;
    height: 64px;
    background: #00a32a;
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
}

/* Pflichtfeld-Flash bei "Eingaben prüfen"-Validierung */
@keyframes smof-field-flash {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
    20%, 80% { box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.45); }
}

.smof-field-flash {
    animation: smof-field-flash 1.5s ease-in-out;
    border-color: #dc3545 !important;
}

.smof-success-page p {
    font-size: 1.2em;
    color: #1d2327;
    margin: 8px 0;
}