/**
 * EQUAL CRM - Status Shortcode Styles
 * Stili per lo shortcode di gestione stato cliente
 */

/* Container */
.crm-status-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Card Base */
.crm-status-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.crm-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* Empty & Error States */
.crm-status-empty,
.crm-status-error-card {
    text-align: center;
    padding: 4rem 2rem;
}

.crm-status-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crm-status-icon i {
    font-size: 3rem;
    color: #fff;
}

.crm-status-error-card .crm-status-icon {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.crm-status-empty h3,
.crm-status-error-card h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.crm-status-empty p,
.crm-status-error-card p {
    color: #666;
    margin-bottom: 1rem;
}

.crm-status-empty code {
    background: #f5f5f5;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: monospace;
    color: #667eea;
}

/* Header */
.crm-status-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

.crm-status-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crm-status-avatar i {
    font-size: 3rem;
    color: #fff;
}

.crm-status-client-info h2 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 0 0.25rem 0;
    font-weight: 700;
}

.crm-status-id {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.crm-status-locked-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #dc3545;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

/* Info Grid */
.crm-status-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.crm-status-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.crm-status-info-item i {
    color: #667eea;
    font-size: 1.2rem;
    margin-top: 0.25rem;
}

.crm-status-info-item label {
    display: block;
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.crm-status-info-item span {
    display: block;
    color: #333;
    font-weight: 500;
}

/* Current Status */
.crm-status-current {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.crm-status-current h4 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.crm-status-current h4 i {
    color: #667eea;
}

.crm-status-badge {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Status Colors */
.crm-status-badge.status-fare_preventivo {
    background: linear-gradient(135deg, #9e0a94 0%, #c71585 100%);
}

.crm-status-badge.status-preventivo {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.crm-status-badge.status-preventivo_sito {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.crm-status-badge.status-preventivo_gestionale {
    background: linear-gradient(135deg, #343a40 0%, #23272b 100%);
}

.crm-status-badge.status-interessato {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.crm-status-badge.status-probabile_chiusura {
    background: linear-gradient(135deg, #343a40 0%, #23272b 100%);
}

.crm-status-badge.status-chiusura_entro_mese {
    background: linear-gradient(135deg, #20c997 0%, #17a085 100%);
}

.crm-status-badge.status-mandato_rf {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.crm-status-badge.status-perdita_tempo {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.crm-status-badge.status-chiuso {
    background: linear-gradient(135deg, #28a745 0%, #32CD32 100%);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
}

.crm-status-value-display {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.crm-status-value-display .label {
    color: #666;
    font-size: 0.9rem;
}

.crm-status-value-display .value {
    color: #28a745;
    font-weight: 700;
    font-size: 1.2rem;
}

.crm-status-updated {
    display: block;
    margin-top: 1rem;
    color: #888;
    font-size: 0.8rem;
}

/* Form Section */
.crm-status-form-section {
    padding: 2rem;
}

.crm-status-form-section h4 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crm-status-form-section h4 i {
    color: #667eea;
}

.crm-status-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.crm-status-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crm-status-form-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.crm-status-select,
.crm-status-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
    color: #333;
}

.crm-status-select:focus,
.crm-status-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.crm-status-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.crm-status-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.crm-status-input-prefix {
    position: absolute;
    left: 1rem;
    color: #888;
    font-weight: 600;
    font-size: 1rem;
}

.crm-status-input-wrapper .crm-status-input {
    padding-left: 2.5rem;
}

.crm-status-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.crm-status-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

/* Locked Message */
.crm-status-locked-message {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin: 1.5rem;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.crm-status-locked-message i {
    font-size: 3rem;
    color: #aaa;
    margin-bottom: 1rem;
    display: block;
}

.crm-status-locked-message p {
    color: #666;
    margin: 0;
}

/* Messages */
.crm-status-success,
.crm-status-error {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.crm-status-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.crm-status-success i {
    color: #28a745;
    font-size: 1.25rem;
}

.crm-status-error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.crm-status-error i {
    color: #dc3545;
    font-size: 1.25rem;
}

/* Responsive */
@media (max-width: 576px) {
    .crm-status-container {
        padding: 0 0.5rem;
        margin: 1rem auto;
    }
    
    .crm-status-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .crm-status-locked-badge {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 1rem;
    }
    
    .crm-status-info-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .crm-status-current,
    .crm-status-form-section {
        padding: 1.5rem;
    }
    
    .crm-status-badge {
        font-size: 0.85rem;
        padding: 0.6rem 1.5rem;
    }
}
