/**
 * Public CSS for Smart Support Ticket Templates
 */

/* Template selector styling - matches Smart Support form fields */
.smart-support-template-selector {
    margin-bottom: 0;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
}

.smart-support-template-selector .form-group {
    margin-bottom: 15px;
}

.smart-support-template-selector label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.template-selector,
.smart-support-template-selector select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 13px;
    line-height: 1.4;
    transition: border-color 0.3s ease;
}

/* Info icon styling */
.template-info-icon {
    margin-left: 5px;
    color: #666;
    font-size: 12px;
    cursor: help;
    opacity: 0.7;
}

.template-info-icon:hover {
    opacity: 1;
}

/* Reduce text size for template selector */
.template-selector {
    font-size: 13px !important;
}

.template-selector option {
    font-size: 13px;
}

.template-selector:focus,
.smart-support-template-selector select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.template-selector-focus {
    border-color: #0073aa !important;
    box-shadow: 0 0 0 1px #0073aa !important;
}

.smart-support-template-selector .description {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Template notices */
.smart-support-template-notice {
    margin: 10px 0;
    padding: 10px 15px;
    border-radius: 4px;
    border-left: 4px solid;
    font-size: 14px;
    line-height: 1.4;
}

.template-notice-success {
    background-color: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.template-notice-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

/* Locked field styling */
.template-locked {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    border-color: #dee2e6 !important;
}

.template-locked:focus {
    box-shadow: none !important;
    border-color: #dee2e6 !important;
}

/* Form field enhancements */
input[type="text"].template-locked,
textarea.template-locked {
    opacity: 0.7;
}

/* Template selector enhancements */
.template-selector option {
    padding: 8px;
}

.template-selector option:first-child {
    font-weight: 600;
    color: #666;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .smart-support-template-selector {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    .template-selector {
        max-width: 100%;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .smart-support-template-selector label {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .smart-support-template-selector {
        padding: 10px;
    }
    
    .template-selector {
        padding: 10px 12px;
    }
}

/* Loading state */
.template-selector:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Hover effects */
.template-selector:hover:not(:disabled),
.smart-support-template-selector select:hover:not(:disabled) {
    border-color: #0073aa;
}

/* Accessibility improvements */
.template-selector:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .smart-support-template-selector {
        border: 2px solid #000;
    }
    
    .template-selector {
        border: 2px solid #000;
    }
    
    .template-locked {
        border: 2px solid #666 !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .smart-support-template-selector {
        background-color: #2d3748;
        border-color: #4a5568;
    }
    
    .smart-support-template-selector label {
        color: #e2e8f0;
    }
    
    .template-selector {
        background-color: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .template-selector:focus {
        border-color: #63b3ed;
        box-shadow: 0 0 0 1px #63b3ed;
    }
    
    .smart-support-template-selector .description {
        color: #a0aec0;
    }
    
    .template-locked {
        background-color: #2d3748 !important;
        color: #a0aec0 !important;
        border-color: #4a5568 !important;
    }
}

/* Animation for template loading */
@keyframes template-loading {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.template-loading {
    animation: template-loading 1s ease-in-out infinite;
}

/* Enhanced form styling */
.smart-support-template-selector + .form-group,
.smart-support-template-selector + .form-row {
    margin-top: 15px;
}

/* Integration with common form frameworks */
.woocommerce .smart-support-template-selector,
.contact-form-7 .smart-support-template-selector {
    margin-bottom: 20px;
}

/* Bootstrap compatibility */
.form-control.template-selector {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Foundation compatibility */
.smart-support-template-selector select {
    margin-bottom: 0;
}

/* Semantic UI compatibility */
.ui.form .smart-support-template-selector {
    margin-bottom: 1em;
}

/* Material Design compatibility */
.mdl-textfield .smart-support-template-selector {
    margin-bottom: 16px;
}

/* Print styles */
@media print {
    .smart-support-template-selector {
        display: none;
    }
    
    .template-locked {
        background-color: transparent !important;
        color: #000 !important;
    }
} 