/* Multi Post Order Form Styles */

.mpo-order-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.mpo-order-form-container h2 {
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4CAF50;
    text-align: center;
}

.mpo-section {
    background: white;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mpo-section h3 {
    color: #555;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.description {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* URL Input Styles */
.mpo-url-row {
    margin-bottom: 15px;
}

.mpo-url-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mpo-url-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.mpo-url-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.mpo-url-input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #f44336;
}

.mpo-remove-url {
    padding: 10px 15px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.mpo-remove-url:hover {
    background: #d32f2f;
}

.mpo-add-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.mpo-add-button:hover {
    background: #1976D2;
}

/* Services Styles */
.mpo-services {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.mpo-service-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 6px;
    transition: background 0.3s;
}

.mpo-service-label:hover {
    background: #e0e0e0;
}

.mpo-service-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.mpo-service-label span {
    font-weight: 500;
    color: #555;
}

/* Total Views Input */
#mpo-total-views {
    width: 200px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
}

#mpo-total-views:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Preview Styles */
.mpo-preview {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    min-height: 100px;
}

.mpo-preview-content h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.mpo-distribution-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mpo-distribution-table thead {
    background: #4CAF50;
    color: white;
}

.mpo-distribution-table th,
.mpo-distribution-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.mpo-distribution-table tbody tr:hover {
    background: #f5f5f5;
}

.mpo-distribution-table tfoot {
    background: #f9f9f9;
    font-weight: bold;
}

.mpo-distribution-table .mpo-views-count {
    text-align: right;
    font-family: monospace;
    font-weight: bold;
    color: #2196F3;
}

.mpo-distribution-table .mpo-views-total {
    text-align: right;
    color: #4CAF50;
    font-size: 1.1em;
}

/* Customer Info */
.mpo-customer-info input {
    width: 100%;
    max-width: 400px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.mpo-customer-info input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Submit Section */
.mpo-submit-section {
    text-align: center;
    margin-top: 30px;
}

.mpo-submit-btn {
    padding: 15px 40px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mpo-submit-btn:hover:not(:disabled) {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.mpo-submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.mpo-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.mpo-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mpo-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .mpo-order-form-container {
        padding: 20px;
    }
    
    .mpo-services {
        flex-direction: column;
        gap: 10px;
    }
    
    .mpo-service-label {
        justify-content: center;
    }
    
    .mpo-url-input-group {
        flex-direction: column;
    }
    
    .mpo-url-input,
    #mpo-total-views {
        width: 100%;
    }
    
    .mpo-remove-url {
        width: 100%;
    }
    
    .mpo-distribution-table {
        font-size: 14px;
    }
    
    .mpo-distribution-table th,
    .mpo-distribution-table td {
        padding: 8px 10px;
    }
}

/* Animation for new URL fields */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mpo-url-row {
    animation: fadeIn 0.3s ease-out;
}

/* Loading state */
.mpo-submit-btn:disabled {
    position: relative;
}

.mpo-submit-btn:disabled::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}