/* nunuachai.com/assets/css/style.css */

/*
 * This file is for global CSS rules that apply to the entire site.
 */

/*
 * FIX: Add a default border and enhanced focus styles to all form input elements.
 * This is the plain CSS equivalent of the Tailwind @apply directive.
 */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="password"],
textarea,
select {
    border: 1px solid #D1D5DB; /* border-gray-300 */
    border-radius: 0.375rem; /* rounded-md */
    outline: 2px solid transparent;
    outline-offset: 2px;
    transition: box-shadow 0.2s ease-in-out;
}

/* Style for when an input is focused */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: #3B82F6; /* focus:border-blue-500 */
    box-shadow: 0 0 0 3px rgba(191, 219, 254, 1); /* focus:ring focus:ring-blue-100 */
}

/* Style for disabled inputs */
input:disabled,
textarea:disabled,
select:disabled {
    background-color: #F3F4F6; /* bg-gray-100 */
    cursor: not-allowed;
}

/*
 * Default styles for buttons to ensure consistency.
 */
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out;
    border: 1px solid transparent;
}

/* Default button colors */
button:not([class*="bg-"]),
input[type="submit"]:not([class*="bg-"]) {
    background-color: #e5e7eb; /* indigo-600 */
    color: black;
}

button:hover:not([disabled]):not([class*="hover:bg-"]),
input[type="submit"]:hover:not([disabled]):not([class*="hover:bg-"]) {
    background-color: #4F46E5; 
    color: white;
}

/* Style for disabled buttons */
button:disabled,
input[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

