/* Stili per il form di registrazione DTWeb */
.dtweb-form-container {
    width: 100%;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-sizing: border-box;
}

.dtweb-form-container * {
    box-sizing: border-box;
}

.dtweb-reg-form {
    width: 100%;
    padding: 0;
    margin: 0;
}

.dtweb-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.dtweb-form-field {
    flex: 1;
    min-width: 0;
}

.dtweb-form-field-full {
    flex: 1 1 100%;
}

.dtweb-phone-field {
    flex: 0 0 80px;
}

.dtweb-phone-field-main {
    flex: 1;
}

.dtweb-form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.dtweb-form-field input[type="text"],
.dtweb-form-field input[type="email"],
.dtweb-form-field input[type="date"],
.dtweb-form-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.dtweb-form-field input:focus,
.dtweb-form-field select:focus {
    outline: none;
    border-color: #8bc47f;
    box-shadow: 0 0 0 3px rgba(139, 196, 127, 0.1);
}

.dtweb-prefix {
    text-align: center;
}

.dtweb-checkbox-field label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.dtweb-checkbox-field input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
    margin-top: 2px;
}

.dtweb-checkbox-field span {
    line-height: 1.4;
}

.dtweb-submit-row {
    margin-top: 30px;
    text-align: center;
}

.dtweb-submit-btn {
    padding: 15px 40px;
    background-color: #8bc47f;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    min-width: 200px;
}

.dtweb-submit-btn:hover {
    background-color: #7ab36e;
    transform: translateY(-2px);
}

.dtweb-submit-btn:active {
    transform: translateY(0);
}

.dtweb-errors {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.dtweb-errors ul {
    margin: 0;
    padding-left: 20px;
}

/* Loading state */
.dtweb-loading {
    position: relative;
}

.dtweb-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 15px;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #8bc47f;
    border-radius: 50%;
    animation: dtweb-spin 1s linear infinite;
    transform: translateY(-50%);
    z-index: 1;
}

.dtweb-loading select,
.dtweb-loading input {
    padding-right: 45px !important;
}

@keyframes dtweb-spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .dtweb-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .dtweb-phone-field,
    .dtweb-phone-field-main {
        flex: 1 1 100%;
    }
    
    .dtweb-submit-btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .dtweb-form-row {
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .dtweb-form-field input,
    .dtweb-form-field select {
        padding: 10px;
        font-size: 16px;
    }
}