/* ============================================
   MODERN FORM COMPONENTS - GLOBAL OVERRIDES
   ============================================
   This file provides modern styling for all form inputs
   across the entire application, overriding Bootstrap defaults
   ============================================ */

/* ============================================
   TEXT INPUTS - MODERN STYLE
   ============================================ */

/* Target all text inputs globally */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
.form-control,
.form-input-modern,
.modern-input,
input.form-input-modern {
    width: 100% !important;
 padding: 12px 16px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    background: #f8fafc !important;
    transition: all 0.3s ease !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #2d3748 !important;
    box-sizing: border-box !important;
    line-height: 1.5 !important;
}

/* Placeholder styling */
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="tel"]::placeholder,
input[type="url"]::placeholder,
input[type="search"]::placeholder,
.form-control::placeholder,
.form-input-modern::placeholder {
    color: #a0aec0 !important;
    opacity: 1 !important;
}

/* Focus state - Beautiful purple glow */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
.form-control:focus,
.form-input-modern:focus {
    outline: none !important;
  border-color: #667eea !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1) !important;
}

/* Hover state */
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
input[type="search"]:hover,
.form-control:hover,
.form-input-modern:hover {
    border-color: #cbd5e0 !important;
}

/* Disabled state */
input[type="text"]:disabled,
input[type="email"]:disabled,
input[type="password"]:disabled,
input[type="number"]:disabled,
.form-control:disabled,
.form-input-modern:disabled {
    background: #f1f5f9 !important;
 color: #94a3b8 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* ============================================
   TEXTAREA - MODERN STYLE
   ============================================ */

textarea,
textarea.form-control,
.form-textarea-modern,
textarea.form-textarea-modern {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    background: #f8fafc !important;
    transition: all 0.3s ease !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #2d3748 !important;
    resize: vertical !important;
    min-height: 120px !important;
    box-sizing: border-box !important;
    line-height: 1.6 !important;
}

textarea::placeholder,
textarea.form-control::placeholder,
.form-textarea-modern::placeholder {
    color: #a0aec0 !important;
    opacity: 1 !important;
}

textarea:focus,
textarea.form-control:focus,
.form-textarea-modern:focus {
    outline: none !important;
    border-color: #667eea !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1) !important;
}

textarea:hover,
textarea.form-control:hover,
.form-textarea-modern:hover {
    border-color: #cbd5e0 !important;
}

textarea:disabled,
textarea.form-control:disabled,
.form-textarea-modern:disabled {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* ============================================
   SELECT DROPDOWN - MODERN STYLE
   ============================================ */

select,
select.form-control,
select.form-select,
.form-select-modern {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e2e8f0 !important;
 border-radius: 10px !important;
    font-size: 15px !important;
    background: #f8fafc !important;
    transition: all 0.3s ease !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #2d3748 !important;
    cursor: pointer !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232d3748' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
 background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
    appearance: none !important;
-webkit-appearance: none !important;
    -moz-appearance: none !important;
}

select:focus,
select.form-control:focus,
select.form-select:focus {
    outline: none !important;
    border-color: #667eea !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1) !important;
}

select:hover,
select.form-control:hover,
select.form-select:hover {
    border-color: #cbd5e0 !important;
}

select:disabled,
select.form-control:disabled {
    background: #f1f5f9 !important;
  color: #94a3b8 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* ============================================
 CHECKBOXES - MODERN STYLE
   ============================================ */

input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 6px !important;
    background: #f8fafc !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    position: relative !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: #667eea !important;
}

input[type="checkbox"]:checked::before {
    content: '?' !important;
    position: absolute !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: bold !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

input[type="checkbox"]:focus {
    outline: none !important;
  border-color: #667eea !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1) !important;
}

input[type="checkbox"]:hover {
    border-color: #cbd5e0 !important;
}

input[type="checkbox"]:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* ============================================
   RADIO BUTTONS - MODERN STYLE
   ============================================ */

input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 50% !important;
    background: #f8fafc !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
 appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    position: relative !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

input[type="radio"]:checked {
    background: #ffffff !important;
    border-color: #667eea !important;
    border-width: 6px !important;
}

input[type="radio"]:focus {
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1) !important;
}

input[type="radio"]:hover {
 border-color: #cbd5e0 !important;
}

input[type="radio"]:disabled {
    opacity: 0.5 !important;
 cursor: not-allowed !important;
}

/* ============================================
   BUTTONS - MODERN STYLE
   ============================================ */

.btn,
button.btn,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info {
    padding: 10px 24px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
 box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4) !important;
}

.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5) !important;
}

.btn-secondary {
    background: #e2e8f0 !important;
    color: #2d3748 !important;
}

.btn-secondary:hover {
    background: #cbd5e0 !important;
    transform: translateY(-2px) !important;
}

.btn-success {
    background: #10b981 !important;
    color: white !important;
}

.btn-danger {
    background: #ef4444 !important;
    color: white !important;
}

.btn-warning {
    background: #f59e0b !important;
    color: white !important;
}

.btn:disabled,
button:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* ============================================
   FORM LABELS - MODERN STYLE
   ============================================ */

label,
.form-label,
.control-label {
    font-weight: 600 !important;
    color: #2d3748 !important;
  font-size: 14px !important;
    margin-bottom: 8px !important;
    display: inline-block !important;
}

/* ============================================
   VALIDATION MESSAGES
   ============================================ */

.validation-message,
.field-validation-error,
.text-danger,
.invalid-feedback {
    color: #ef4444 !important;
    font-size: 13px !important;
    margin-top: 6px !important;
    font-weight: 500 !important;
}

.validation-summary-errors {
    background: #fee2e2 !important;
    border: 2px solid #ef4444 !important;
    border-radius: 10px !important;
    padding: 16px !important;
    margin-bottom: 20px !important;
    color: #991b1b !important;
}

/* ============================================
   INPUT GROUPS
   ============================================ */

.input-group {
    display: flex !important;
gap: 8px !important;
    align-items: center !important;
}

.input-group input,
.input-group select,
.input-group textarea {
  flex: 1 !important;
}

/* ============================================
   READONLY INPUTS
   ============================================ */

input[readonly],
textarea[readonly],
select[readonly],
.form-control[readonly] {
    background: #f1f5f9 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    border-color: #e2e8f0 !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    input[type="text"],
input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select,
    .form-control {
        padding: 10px 14px !important;
   font-size: 14px !important;
    }

    .btn {
        padding: 8px 20px !important;
        font-size: 14px !important;
    }
}

/* ============================================
   FOCUS VISIBLE FOR ACCESSIBILITY
   ============================================ */

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 3px solid #667eea !important;
    outline-offset: 2px !important;
}

/* ============================================
   REMOVE BROWSER DEFAULT STYLING
   ============================================ */

input,
textarea,
select,
button {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Remove spinners from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

input[type="number"] {
    -moz-appearance: textfield !important;
}

/* Remove default search styling */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
 -webkit-appearance: none !important;
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes inputFocus {
    from {
     transform: scale(1);
    }
    to {
        transform: scale(1.01);
    }
}

input:focus,
textarea:focus,
select:focus {
  animation: inputFocus 0.3s ease-out !important;
}

/* ============================================
   END OF MODERN COMPONENTS
   ============================================ */

/* ============================================
   MODERN BUTTON EXTENSIONS
   ============================================ */

.btn-modern {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
gap: 8px;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.btn-modern-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    color: white;
}

.btn-modern-secondary {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-modern-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

/* ============================================
   MODERN CARD COMPONENT
   ============================================ */

.modern-card {
    background: white;
  border-radius: 16px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08), 0 1.5px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.modern-card:hover {
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
}
