/* Orçamentos Pro - Frontend Public Form */

.orc-public-form {
    max-width: 900px;
    margin: 40px auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.orc-public-form * {
    box-sizing: border-box;
}

/* Header */
.orc-public-header {
    background: linear-gradient(135deg, #2a004a 0%, #5a0099 100%);
    color: #fff;
    padding: 40px;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.orc-public-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
}

.orc-public-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* Progress Steps */
.orc-steps {
    display: flex;
    justify-content: space-between;
    padding: 30px 40px;
    background: #fff;
    border-bottom: 2px solid #e0e0e0;
}

.orc-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.orc-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #7f8c8d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.orc-step.active .orc-step-number {
    background: #2a004a;
    color: #fff;
}

.orc-step.completed .orc-step-number {
    background: #27ae60;
    color: #fff;
}

.orc-step-label {
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 500;
}

.orc-step.active .orc-step-label {
    color: #2a004a;
    font-weight: 600;
}

/* Form Content */
.orc-public-content {
    background: #fff;
    padding: 40px;
}

.orc-form-section {
    display: none;
}

.orc-form-section.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.orc-form-group {
    margin-bottom: 24px;
}

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

.orc-form-group label .required {
    color: #e74c3c;
}

.orc-form-input,
.orc-form-select,
.orc-form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
}

.orc-form-input:focus,
.orc-form-select:focus,
.orc-form-textarea:focus {
    border-color: #2a004a;
    box-shadow: 0 0 0 3px rgba(42, 0, 74, 0.1);
    outline: none;
}

.orc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.orc-radio-group {
    display: flex;
    gap: 20px;
}

.orc-radio-option {
    flex: 1;
}

.orc-radio-option input[type="radio"] {
    display: none;
}

.orc-radio-label {
    display: block;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.orc-radio-option input[type="radio"]:checked + .orc-radio-label {
    border-color: #2a004a;
    background: #f3e5f5;
    color: #2a004a;
}

.orc-radio-label:hover {
    border-color: #5a0099;
}

/* Product Search */
.orc-product-search {
    position: relative;
}

.orc-product-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #2a004a;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.orc-product-results.show {
    display: block;
}

.orc-product-item-result {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #e0e0e0;
}

.orc-product-item-result:hover {
    background: #f3e5f5;
}

.orc-product-item-result strong {
    display: block;
    color: #2a004a;
    margin-bottom: 4px;
}

.orc-product-item-result small {
    color: #7f8c8d;
    font-size: 12px;
}

.orc-product-item-result .price {
    float: right;
    color: #27ae60;
    font-weight: 700;
}

/* Selected Products */
.orc-selected-products {
    margin-top: 24px;
}

.orc-selected-product {
    background: #f9fafb;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.orc-selected-product-info h4 {
    margin: 0 0 4px 0;
    color: #2a004a;
    font-size: 16px;
}

.orc-selected-product-info p {
    margin: 0;
    color: #7f8c8d;
    font-size: 13px;
}

.orc-selected-product-qty {
    display: flex;
    align-items: center;
    gap: 12px;
}

.orc-qty-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #2a004a;
    background: #fff;
    color: #2a004a;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.2s;
}

.orc-qty-btn:hover {
    background: #2a004a;
    color: #fff;
}

.orc-qty-value {
    font-weight: 700;
    font-size: 18px;
    min-width: 40px;
    text-align: center;
}

.orc-remove-btn {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.orc-remove-btn:hover {
    background: #c0392b;
}

/* Summary */
.orc-summary {
    background: linear-gradient(135deg, #2a004a 0%, #5a0099 100%);
    padding: 24px;
    border-radius: 12px;
    color: #fff;
    margin-top: 24px;
}

.orc-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 16px;
}

.orc-summary-row.total {
    border-top: 2px solid rgba(255,255,255,0.3);
    margin-top: 12px;
    padding-top: 16px;
    font-size: 20px;
    font-weight: 700;
}

.orc-summary-row.discount {
    color: #fef3c7;
}

/* Navigation Buttons */
.orc-form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #e0e0e0;
}

.orc-btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.orc-btn-primary {
    background: #2a004a;
    color: #fff;
}

.orc-btn-primary:hover {
    background: #3d0066;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 0, 74, 0.3);
}

.orc-btn-secondary {
    background: #e0e0e0;
    color: #2a004a;
}

.orc-btn-secondary:hover {
    background: #d0d0d0;
}

.orc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success Message */
.orc-success-message {
    text-align: center;
    padding: 60px 40px;
}

.orc-success-icon {
    width: 80px;
    height: 80px;
    background: #27ae60;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
    margin-bottom: 24px;
}

.orc-success-message h3 {
    color: #2a004a;
    font-size: 28px;
    margin: 0 0 16px 0;
}

.orc-success-message p {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0 0 32px 0;
}

.orc-download-btn {
    display: inline-block;
    background: #2a004a;
    color: #fff;
    padding: 16px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
}

.orc-download-btn:hover {
    background: #3d0066;
    transform: translateY(-2px);
    color: #fff;
}

/* Loading */
.orc-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.orc-loading-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

.orc-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #2a004a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .orc-public-form {
        margin: 20px;
    }
    
    .orc-public-header {
        padding: 30px 20px;
    }
    
    .orc-public-header h2 {
        font-size: 24px;
    }
    
    .orc-steps {
        padding: 20px 10px;
    }
    
    .orc-step-label {
        font-size: 11px;
    }
    
    .orc-public-content {
        padding: 24px;
    }
    
    .orc-form-row {
        grid-template-columns: 1fr;
    }
    
    .orc-radio-group {
        flex-direction: column;
    }
}
