/* Contact Form Emailer Styles */
.cfe-form-container {
    max-width: 600px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cfe-contact-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cfe-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

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

.cfe-form-group.cfe-half {
    flex: 1;
}

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

.cfe-required {
    color: #e74c3c;
}

.cfe-input,
.cfe-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.cfe-input:focus,
.cfe-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

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

/* File Upload Styles */
.cfe-file-upload-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.cfe-file-input {
    position: absolute;
    opacity: 0;
    width: 0.1px;
    height: 0.1px;
    overflow: hidden;
}

.cfe-file-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px dashed #e1e8ed;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.cfe-file-label:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.cfe-file-button {
    background: #3498db;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    margin-right: 15px;
    white-space: nowrap;
}

.cfe-file-name {
    color: #666;
    font-size: 14px;
    flex: 1;
}

.cfe-selected-files {
    margin-top: 10px;
}

.cfe-selected-file {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 14px;
}

.cfe-file-item-name {
    flex: 1;
    margin-right: 10px;
    word-break: break-word;
}

.cfe-file-item-size {
    color: #666;
    font-size: 12px;
    margin-right: 10px;
}

.cfe-remove-file {
    background: #e74c3c;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.cfe-remove-file:hover {
    background: #c0392b;
}

.cfe-total-size {
    padding: 5px 0;
    font-size: 12px;
    color: #666;
    font-weight: 600;
    border-top: 1px solid #e1e8ed;
    margin-top: 5px;
    padding-top: 8px;
}

.cfe-file-info {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin-top: 10px;
}

/* Submit Button */
.cfe-submit-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 150px;
}

.cfe-submit-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.cfe-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.cfe-submit-spinner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cfe-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: cfe-spin 1s linear infinite;
}

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

/* Message Styles */
.cfe-message {
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .cfe-contact-form {
        padding: 20px;
    }
    
    .cfe-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .cfe-form-group.cfe-half {
        margin-bottom: 20px;
    }
    
    .cfe-input,
    .cfe-textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .cfe-submit-button {
        width: 100%;
        padding: 15px;
    }
    
    .cfe-file-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cfe-file-button {
        margin-right: 0;
        align-self: flex-start;
    }
    
    .cfe-selected-file {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .cfe-file-item-name {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .cfe-file-item-size {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .cfe-remove-file {
        align-self: flex-end;
        margin-top: -25px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cfe-contact-form {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .cfe-form-group label {
        color: #ecf0f1;
    }
    
    .cfe-input,
    .cfe-textarea {
        background: #34495e;
        border-color: #4a5f7a;
        color: #ecf0f1;
    }
    
    .cfe-input:focus,
    .cfe-textarea:focus {
        border-color: #3498db;
        background: #2c3e50;
    }
    
    .cfe-file-label {
        border-color: #4a5f7a;
        background: #34495e;
    }
    
    .cfe-file-label:hover {
        background: #4a5f7a;
    }
    
    .cfe-file-name {
        color: #bdc3c7;
    }
    
    .cfe-file-info {
        color: #95a5a6;
    }
}