/**
 * CNC Request Form Styles
 * Modal form styling matching the existing site design
 */

/* Modal Overlay */
.request-form-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.request-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

/* Modal Container */
.request-form-container {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease-out;
    z-index: 1000000;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.request-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 2px solid #e1e6ef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.request-form-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.request-form-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.request-form-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Body */
.request-form-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.request-form-body::-webkit-scrollbar {
    width: 8px;
}

.request-form-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.request-form-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.request-form-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Form Sections */
.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e6ef;
}

.offering-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.offering-section h3 {
    border-bottom: none;
    color: #333;
    margin-bottom: 15px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    font-size: 15px;
}

.form-group .required-mark {
    color: #e74c3c;
    margin-left: 4px;
}

/* Form Inputs */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e6ef;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: white;
    box-sizing: border-box;
}

/* Date Input - Make entire box clickable */
.form-group input[type="date"] {
    cursor: pointer;
    position: relative;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    opacity: 0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group .readonly-field {
    background-color: #f5f7fa;
    cursor: not-allowed;
    color: #555;
    font-weight: 600;
}

/* Error States */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #e74c3c;
}

.error-message {
    display: block;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 6px;
    min-height: 18px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e1e6ef;
}

.form-actions button {
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #f5f7fa;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    margin: 0 auto 20px;
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.success-message h3 {
    color: #2ecc71;
    font-size: 24px;
    margin: 0 0 15px 0;
}

.success-message p {
    color: #666;
    margin: 10px 0;
    line-height: 1.6;
}

.success-message button {
    margin-top: 20px;
}

/* Raise Request Button */
.raise-request-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-top: 20px;
}

.raise-request-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.raise-request-btn:active {
    transform: translateY(0);
}

.raise-request-btn i {
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .request-form-container {
        max-width: 100%;
        max-height: 95vh;
        margin: 10px;
        border-radius: 8px;
    }

    .request-form-header {
        padding: 20px;
    }

    .request-form-header h2 {
        font-size: 20px;
    }

    .request-form-body {
        padding: 20px;
    }

    .form-section h3 {
        font-size: 16px;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions button {
        width: 100%;
    }

    .raise-request-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .request-form-modal {
        padding: 0;
    }

    .request-form-container {
        border-radius: 0;
        max-height: 100vh;
    }

    .request-form-header {
        border-radius: 0;
    }
}

/* Loading State */
.form-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

