/* MyCRC Connector Form Styles */
.mycrc-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.mycrc-form {
    display: block;
}

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

.mycrc-form-group {
    margin-bottom: 20px;
    position: relative;
}

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

.mycrc-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.mycrc-form .required {
    color: #e74c3c;
}

.mycrc-form .optional {
    color: #7f8c8d;
    font-weight: 400;
    font-size: 12px;
}

.mycrc-form input[type="text"],
.mycrc-form input[type="email"],
.mycrc-form input[type="tel"],
.mycrc-form input[type="number"],
.mycrc-form select,
.mycrc-form textarea {
    width: 100%;
        padding: 11px 15px;
    border: 2px solid #dadbdd;
    border-radius: 7px;
    font-size: 16px;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.mycrc-form input[type="text"]:focus,
.mycrc-form input[type="email"]:focus,
.mycrc-form input[type="tel"]:focus,
.mycrc-form select:focus,
.mycrc-form textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.mycrc-form .checkbox-label {
	display: flex;
    flex-direction: row;
    gap: 10px;
}
.mycrc-form .checkbox-group {
	display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}
.mycrc-form input[type=checkbox] {
  /* Add if not using autoprefixer */
  -webkit-appearance: none;
  /* Remove most all native input styles */
  -moz-appearance: none;
       appearance: none;
  /* For iOS < 15 */
  background-color: var(--form-background);
  /* Not removed via appearance */
  margin: 0;
  font: inherit;
  color: currentColor;
  width: 20px;
  height: 20px;
  border: 0.15em solid currentColor;
  border-radius: 0.15em;
  transform: translateY(-0.075em);
  display: grid;
  place-content: center;
	    background: #fff;
}

.mycrc-form input[type=checkbox]::before {
  content: "";
    width: 15px;
    height: 15px;
  -webkit-clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
          clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0);
  transform-origin: bottom left;
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em var(--form-control-color);
  /* Windows High Contrast Mode */
  background-color: CanvasText;
}

.mycrc-form input[type=checkbox]:checked::before {
  transform: scale(1);
}

.mycrc-form input[type=checkbox]:focus {
  outline: max(2px, 0.15em) solid currentColor;
  outline-offset: max(2px, 0.15em);
}

.mycrc-form input[type=checkbox]:disabled {
  --form-control-color: var(--form-control-disabled);
  color: var(--form-control-disabled);
  cursor: not-allowed;
}


.mycrc-form input.error,
.mycrc-form select.error,
.mycrc-form textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.mycrc-form select {
    cursor: pointer;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

.mycrc-form textarea {
    resize: vertical;
    min-height: 100px;
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

.char-counter.warning {
    color: #f39c12;
}

.char-counter #char-count.warning {
    color: #e74c3c;
    font-weight: 600;
}

.error-message {
    display: none;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

.mycrc-submit-btn {
	background-image: linear-gradient(90deg, #009bd1, #009688 50%, #4caf50 100%);
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 200px;
    text-align: center;
	margin: auto;
    display: block;
}

.mycrc-submit-btn:hover:not(:disabled) {
    background: #009688;
}

.mycrc-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.form-messages {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    display: none;
}

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

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

.form-messages .success-message {
	    font-size: 18px;
    text-align: center;
    font-weight: 600;
    color: #00ff2c;
}

.form-messages p {
    margin: 0;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mycrc-form-container {
        margin: 10px;
        padding: 15px;
    }
    
    .mycrc-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .mycrc-form-group {
        margin-bottom: 15px;
    }
    
    .mycrc-submit-btn {
        width: 100%;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .mycrc-form-container {
        margin: 5px;
        padding: 10px;
    }
    
    .mycrc-form input[type="text"],
    .mycrc-form input[type="email"],
    .mycrc-form input[type="tel"],
    .mycrc-form select,
    .mycrc-form textarea {
        padding: 10px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
	.mycrc-form .checkbox-group {
		grid-template-columns: 1fr;
	}
}

/* Focus states for accessibility */
.mycrc-form button:focus,
.mycrc-form input:focus,
.mycrc-form select:focus,
.mycrc-form textarea:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mycrc-form-container {
        border: 2px solid #000000;
    }
    
    .mycrc-form input[type="text"],
    .mycrc-form input[type="email"],
    .mycrc-form input[type="tel"],
    .mycrc-form select,
    .mycrc-form textarea {
        border: 2px solid #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .mycrc-form input[type="text"],
    .mycrc-form input[type="email"],
    .mycrc-form input[type="tel"],
    .mycrc-form select,
    .mycrc-form textarea,
    .mycrc-submit-btn {
        transition: none;
    }
    
    .btn-loading::after {
        animation: none;
    }
}

/* FM Simulator Styles */
.fm-simulator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.simulator-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    font-size: 16px;
    color: #555;
    margin: 0;
}

.simulator-content {
    padding: 20px 0;
}

.simulator-error {
    text-align: center;
    padding: 40px 20px;
    background-color: #ffebee;
    border: 1px solid #f44336;
    border-radius: 4px;
    margin: 20px 0;
}

.simulator-error .error-message {
    color: #d32f2f;
    font-size: 16px;
    margin: 0;
}

/* Simulation Comparison Table Styles */
.simulation-comparison-table {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px 0;
}

.simulation-comparison-table h3 {
    background: #007cba;
    color: white;
    margin: 0;
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
}

.comparison-table-wrapper {
    overflow-x: auto;
    padding: 20px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
}

.comparison-table th,
.comparison-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.comparison-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 1;
}

.comparison-table tbody tr:hover {
    background-color: #f5f5f5;
}

.comparison-table .criterion-name {
    font-weight: bold;
    color: #333;
    background-color: #f8f9fa;
    min-width: 200px;
}

.comparison-table .criterion-value {
    color: #555;
    white-space: nowrap;
}

/* Responsive design */
@media (max-width: 768px) {
    .fm-simulator-container {
        padding: 10px;
    }
    
    .comparison-table-wrapper {
        padding: 10px;
    }
    
    .comparison-table {
        font-size: 12px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 8px 10px;
    }
    
    .simulation-comparison-table h3 {
        font-size: 18px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .comparison-table th,
    .comparison-table td {
        padding: 6px 8px;
    }
    
    .comparison-table .criterion-name {
        min-width: 150px;
    }
}

/* Loading animation enhancement */
.simulator-loading .loading-spinner {
    position: relative;
}

.simulator-loading .loading-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border-radius: 50%;
    background: #007cba;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Table styling improvements */
.comparison-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.comparison-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

/* Highlight important values */
.comparison-table .criterion-value {
    position: relative;
}

.comparison-table tr:hover .criterion-value {
    background-color: #e3f2fd;
}

/* Success message styling */
.simulator-success {
    background-color: #e8f5e8;
    border: 1px solid #4caf50;
    color: #2e7d32;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
} 