/**
 * Form Upload Appunti - Complete Styles
 * Personalizza questo file per adattare lo stile al tuo tema
 */

/* ==========================================================================
   CONTAINER PRINCIPALE
   ========================================================================== */

.ma-upload-form {
    max-width: 800px;
    margin: 40px auto;
    padding: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.ma-form {
    padding: 40px;
}

/* ==========================================================================
   SEZIONI
   ========================================================================== */

.ma-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e5e7eb;
}

.ma-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Sezione File Upload */
.ma-section-file {
    background: #ffffff;
    padding: 40px;
    margin: 0 0 40px 0;
    border-radius: 0;
    border-bottom: 2px solid #e5e7eb;
}

/* Sezione Corso - Disabilitata */
.ma-section-disabled {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
    min-height: 200px;
}

.ma-section-disabled::after {
    content: '🔒 Carica prima il file PDF';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    padding: 20px 40px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    color: #6b7280;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    white-space: nowrap;
}

/* ==========================================================================
   CAMPI FORM
   ========================================================================== */

.ma-field {
    margin-bottom: 24px;
}

.ma-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    letter-spacing: 0.3px;
}

.ma-section-file .ma-label {
    color: #374151;
    font-size: 16px;
}

.ma-label-required::after {
    content: ' *';
    color: #ef4444;
    font-weight: bold;
}

/* Input Text, Select, Textarea */
.ma-input,
.ma-select,
.ma-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #ffffff;
}

.ma-input:focus,
.ma-select:focus,
.ma-textarea:focus {
    outline: none;
    border-color: #00a19a;
    box-shadow: 0 0 0 3px rgba(0, 161, 154, 0.1);
}

.ma-input::placeholder {
    color: #9ca3af;
}

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

/* Container per upload */
.ma-file-upload-container {
    position: relative;
    width: 100%;
}

/* Input File - Stile Drag & Drop Moderno */
.ma-input-file {
    width: 100%;
    min-height: 220px;
    padding: 0;
    border: 3px dashed #00a19a !important;
    border-radius: 16px;
    background: transparent;
    color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0 !important;
    display: block;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    opacity: 0;
}

/* Nascondi completamente il testo del file */
.ma-input-file::-webkit-file-upload-button {
    display: none;
}

.ma-input-file::file-selector-button {
    display: none;
}

/* Overlay con testi */
.ma-file-upload-overlay {
    position: relative;
    width: 100%;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
    border: 3px dashed #00a19a;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 100%);
    transition: all 0.3s ease;
}

.ma-upload-icon {
    margin-bottom: 20px;
    transition: all 0.3s;
}

.ma-upload-icon svg {
    display: block;
}

.ma-upload-text {
    font-size: 22px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.ma-upload-hint {
    font-size: 14px;
    color: #9ca3af;
}

.ma-file-upload-container:hover .ma-file-upload-overlay {
    border-color: #008f89;
    border-width: 4px;
    background: linear-gradient(135deg, #f0fdfc 0%, #e0f2f1 100%);
    box-shadow: 0 4px 20px rgba(0, 161, 154, 0.2);
}

.ma-file-upload-container:hover .ma-upload-icon {
    transform: scale(1.1);
}

.ma-file-upload-container:hover .ma-upload-icon svg {
    stroke: #00a19a;
}

.ma-file-upload-container:hover .ma-upload-text {
    color: #00a19a;
}

/* Input Search */
.ma-input-search {
    background: #f9fafb;
    border-color: #d1d5db;
    margin-bottom: 12px;
}

.ma-input-search:focus {
    background: #ffffff;
}

/* Field Hint */
.ma-field-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #6b7280;
}

/* ==========================================================================
   FILE STATUS & PROGRESS
   ========================================================================== */

.ma-file-status {
    margin-top: 24px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.ma-status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: #374151;
}

.ma-status-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.ma-status-text {
    font-weight: 600;
    font-size: 15px;
}

.ma-status-detail {
    margin-left: auto;
    font-size: 14px;
    opacity: 0.9;
}

.ma-status-success .ma-status-icon {
    color: #10b981;
}

.ma-status-error {
    color: #fecaca !important;
}

.ma-status-error .ma-status-icon {
    color: #ef4444;
}

/* Progress Bar */
.ma-progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 8px;
}

.ma-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00a19a, #00c4bb);
    transition: width 0.3s ease;
    border-radius: 5px;
}

/* ==========================================================================
   FORM ACTIONS & BUTTONS
   ========================================================================== */

.ma-form-actions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.ma-button {
    display: inline-block;
    padding: 16px 48px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.ma-button-submit {
    background: #00a19a;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 161, 154, 0.4);
}

.ma-button-submit:hover:not(:disabled) {
    background: #008f89;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 161, 154, 0.5);
}

.ma-button-submit:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.ma-submit-hint {
    display: block;
    margin-top: 12px;
    font-size: 14px;
    color: #6b7280;
}

/* ==========================================================================
   MESSAGES
   ========================================================================== */

.ma-message {
    margin: 24px 0;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 15px;
    display: none;
}

.ma-message.ma-notice-success {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.ma-message.ma-notice-error {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.ma-message.ma-notice-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.ma-message p {
    margin: 0;
}

/* ==========================================================================
   NOTE: Responsive gestito da Bricks Builder
   ========================================================================== */
