/**
 * CSS for Refer a Contractor Form
 * Using rac- prefix for all classes to avoid conflicts
 */



.rac-title {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}
h2.rac-title {
    font-weight: 700;
    margin-bottom: 30px;
}


/* Row and column layout */
.rac-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.rac-col {
    flex: 1;
    padding: 0 10px;
    min-width: 240px;
}

.rac-form-group {
    margin-bottom: 15px;
}

.rac-label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.rac-required {
    color: #e74c3c;
}

.rac-input,
.rac-select,
.rac-textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px !important;
    color: #333;
    background-color: #fff;
    transition: border-color 0.3s ease;
    box-shadow: unset !important;
}

/* Shorter textarea */
.rac-shorter-textarea {
    height: 80px;
    min-height: 80px;
}

.rac-input:focus,
.rac-select:focus,
.rac-textarea:focus {
    border-color: #f67f31;
    outline: none;
    box-shadow: 0 0 0 2px rgba(246, 127, 49, 0.2);
}

.rac-upload-container {
    border: 2px dashed #ddd;
    border-radius: 6px;
    padding: 25px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Shorter upload area */
.rac-shorter-upload {
    padding: 15px;
}

.rac-upload-container:hover {
    border-color: #f67f31;
    background-color: rgba(246, 127, 49, 0.05);
}

.rac-upload-icon {
    color: #999;
    margin-bottom: 10px;
}

.rac-upload-icon svg {
    width: 36px;
    height: 36px;
    stroke: #999;
}

.rac-upload-text {
    color: #555;
    font-size: 14px;
    margin-bottom: 5px;
}

.rac-upload-hint {
    color: #999;
    font-size: 12px;
    margin: 5px 0 0;
}

.rac-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.rac-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.rac-file-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f3f3f3;
}

.rac-file-preview img,
.rac-file-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rac-file-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

.rac-submit-btn {
    background-color: #f67f31;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}

.rac-submit-btn:hover {
    background-color: #e67321;
}

.rac-form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.rac-form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.rac-form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Style for file name after selection */
.rac-file-name {
    font-size: 12px;
    margin-top: 5px;
    color: #555;
    word-break: break-all;
}

/* Loading spinner for form submission */
.rac-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: rac-spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes rac-spin {
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rac-form-container {
        padding: 10px;
    }
    
    .rac-form {
        padding: 15px;
    }
    
    .rac-col {
        flex: 100%;
        margin-bottom: 0;
    }
    
    .rac-form-group {
        margin-bottom: 10px;
    }
}









.my-referrals-container {
    margin-bottom: 40px;
}

/* Status Badge Styles */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: bold;
    color: #fff;
}

.status-received {
    background-color: #3498db; /* Blue */
}

.status-contacted {
    background-color: #f39c12; /* Orange */
}

.status-denied {
    background-color: #e74c3c; /* Red */
}

.status-contract-approved {
    background-color: #27ae60; /* Green */
}

.status-contract-in-progress {
    background-color: #9b59b6; /* Purple */
}

.status-contract-completed {
    background-color: #2ecc71; /* Light Green */
}

.status-contract-closed {
    background-color: #34495e; /* Dark Blue */
}

.status-contract-paid-out {
    background-color: #16a085; /* Teal */
}

/* Single Referral Styles */
.single-referral-container {
    margin-bottom: 40px;
}

.referral-status {
    margin: 20px 0;
}

.referral-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .referral-details-grid {
        grid-template-columns: 1fr;
    }
}

.referral-section {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
}

.referral-info-table {
    width: 100%;
    border-collapse: collapse;
}

.referral-info-table th {
    text-align: left;
    width: 40%;
    padding: 8px 10px 8px 0;
    vertical-align: top;
}

.referral-info-table td {
    padding: 8px 0;
    vertical-align: top;
}

.referral-description {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.gallery-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: auto;
    display: block;
}

/* DataTables Customization */
#my-referrals-table_wrapper .dataTables_length, 
#my-referrals-table_wrapper .dataTables_filter {
    margin-bottom: 15px;
}

/* Button Styles */


.view-referral:hover {
    background-color: #45a049;
    color: white;
}

.dt-layout-cell.dt-layout-start {
    display: none !important;
}


table#my-referrals-table th {
    text-transform: inherit;
    border: unset;
    background-color: #f97316;
    color: #fff;
    padding: 15px;
}

.view-referral {
    display: inline-block !important;
    padding: 0px 8px !important;
    background-color: #4CAF50 !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 3px !important;
    font-size: 0.9em !important;
    border: none !important;
    cursor: pointer !important;
    text-transform: inherit !important;
    margin: 0px !important;
}

table#my-referrals-table td {
    border: unset !important;
}

button.dt-paging-button {
    margin: 0px !important;
    padding: 0px 15px !important;
    border: unset !important;
}