/* Consenso Fiori di Bach - Form Styles */

.fiori-bach-consent-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.fiori-bach-consent-form {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 30px;
    text-align: center;
}

.form-header h2 {
    margin: 0 0 10px 0;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.form-header .subtitle {
    margin: 0 0 15px 0;
    font-size: 16px;
    opacity: 0.95;
    font-weight: 400;
}

.registry-link {
    margin: 15px 0 0 0;
}

.registry-link a {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.registry-link a:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Content */
.form-content {
    padding: 40px;
}

/* Informativa Text */
.informativa-text {
    margin-bottom: 40px;
    line-height: 1.7;
    color: #333;
}

.informativa-text h3 {
    color: #667eea;
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.informativa-text h4 {
    color: #764ba2;
    font-size: 17px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.informativa-text p {
    margin-bottom: 15px;
}

.informativa-text ul,
.informativa-text ol {
    margin: 15px 0 15px 20px;
    padding-left: 20px;
}

.informativa-text li {
    margin-bottom: 8px;
}

.informativa-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.informativa-text a:hover {
    text-decoration: underline;
}

.privacy-date {
    background: #f0f4ff;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-top: 30px;
}

/* Personal Data Form */
.personal-data-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
}

.personal-data-form h3 {
    color: #667eea;
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: 600;
}

.form-note {
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
}

/* Form Elements */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.help-text {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Checkbox Group */
.checkbox-group {
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 2px 12px 0 0;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-label span {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
}

/* Consent Section */
.consent-section {
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    border: 2px solid #667eea;
}

.consent-section h3 {
    color: #667eea;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

.section-note {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 10px;
    background: #f0f4ff;
    border-radius: 6px;
}

.consent-item {
    background: #f0f4ff;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid #d0d9ff;
    transition: all 0.3s ease;
}

.consent-item.required {
    border-left: 4px solid #667eea;
}

.consent-item.error-highlight {
    border-color: #dc3545;
    background: #fff5f5;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.consent-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
}

.consent-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    min-width: 22px;
    margin: 2px 15px 0 0;
    cursor: pointer;
    accent-color: #667eea;
}

.consent-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.consent-text strong {
    color: #667eea;
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
}

.doc-link {
    display: inline-block;
    margin-top: 5px;
    color: #764ba2;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.doc-link:hover {
    color: #667eea;
    text-decoration: underline;
}

.consent-note {
    margin-top: 20px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
}

/* Documents Section */
.documents-section {
    border-color: #764ba2;
}

.documents-section h3 {
    color: #764ba2;
}

.documents-section .consent-item {
    background: #faf5ff;
    border-color: #e9d5ff;
}

.documents-section .consent-item.required {
    border-left-color: #764ba2;
}

/* Form Actions */
.form-actions {
    margin-top: 30px;
    text-align: center;
}

.submit-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    padding: 16px 50px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.submit-button.loading {
    position: relative;
    color: transparent;
}

.submit-button.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* Form Messages */
.form-message {
    display: none;
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .form-content {
        padding: 25px;
    }
    
    .personal-data-form {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-header h2 {
        font-size: 22px;
    }
    
    .submit-button {
        width: 100%;
        padding: 14px 30px;
    }
    
    .consent-label input[type="checkbox"] {
        margin-right: 10px;
    }
    
    .consent-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .fiori-bach-consent-wrapper {
        padding: 0 10px;
        margin: 20px auto;
    }
    
    .form-content {
        padding: 20px;
    }
    
    .personal-data-form {
        padding: 15px;
    }
    
    .form-header {
        padding: 20px;
    }
    
    .form-header h2 {
        font-size: 20px;
    }
    
    .consent-section {
        padding: 15px;
    }
    
    .consent-item {
        padding: 15px;
    }
}

/* Already Submitted Message Styles */
.fiori-bach-already-submitted {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px 0;
}

.already-submitted-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    padding: 40px 30px;
    text-align: center;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 15px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.already-submitted-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.already-submitted-content {
    padding: 40px 30px;
}

.main-message {
    font-size: 18px;
    color: #059669;
    text-align: center;
    margin-bottom: 30px;
}

.info-box {
    background: #ecfdf5;
    border-left: 4px solid #10b981;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.info-box p {
    margin: 0 0 10px 0;
    color: #065f46;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.actions-box {
    background: #f9fafb;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.actions-box h3 {
    color: #1f2937;
    font-size: 20px;
    margin: 0 0 15px 0;
}

.actions-box ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.actions-box li {
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.6;
}

.actions-box a {
    color: #059669;
    text-decoration: none;
    font-weight: 500;
}

.actions-box a:hover {
    text-decoration: underline;
}

.note-box {
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 30px;
}

.note-box p {
    margin: 0;
    color: #92400e;
    font-size: 14px;
}

.links-box {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.btn-secondary {
    background: #ffffff;
    color: #059669;
    border: 2px solid #10b981;
}

.btn-secondary:hover {
    background: #ecfdf5;
    transform: translateY(-2px);
    color: #059669;
    text-decoration: none;
}

@media (max-width: 768px) {
    .already-submitted-header {
        padding: 30px 20px;
    }
    
    .already-submitted-header h2 {
        font-size: 24px;
    }
    
    .success-icon {
        font-size: 48px;
    }
    
    .already-submitted-content {
        padding: 30px 20px;
    }
    
    .main-message {
        font-size: 16px;
    }
    
    .links-box {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        min-width: auto;
    }
}

