/* --- Global Wrapper & Font --- */
.ifsc-finder-wrapper { font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; position: relative; }
/* --- Main Container --- */
.ifsc-finder-container { max-width: 600px; margin: 40px auto; background: #ffffff; border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08); border: 1px solid #e9e9e9; overflow: hidden; padding: 25px 30px; }
/* --- Tabs --- */
.ifsc-finder-tabs { display: flex; margin-bottom: 25px; border-radius: 25px; background-color: #f1f3f5; padding: 4px; }
.ifsc-tab-button { flex: 1; padding: 10px 15px; border: none; background-color: transparent; cursor: pointer; font-size: 15px; font-weight: 500; color: #555; border-radius: 22px; transition: all 0.3s ease-in-out; }
.ifsc-tab-button.active { background-color: #007bff; color: #ffffff; box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25); }
/* --- Forms --- */
.ifsc-forms-wrapper { position: relative; }
.ifsc-finder-form { transition: opacity 0.4s ease, transform 0.4s ease; opacity: 0; transform: translateY(10px); position: absolute; width: 100%; visibility: hidden; }
.ifsc-finder-form.active { opacity: 1; transform: translateY(0); position: relative; visibility: visible; }
.ifsc-form-row { margin-bottom: 15px; }
.ifsc-finder-form select, .ifsc-finder-form input[type="text"] { width: 100%; padding: 12px 15px; font-size: 16px; font-family: inherit; border: 1px solid #ced4da; border-radius: 8px; background-color: #f8f9fa; color: #495057; transition: border-color 0.3s ease, box-shadow 0.3s ease; box-sizing: border-box; }
.ifsc-finder-form select { appearance: none; -webkit-appearance: none; -moz-appearance: none; background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%236c757d%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22/%3E%3C/svg%3E'); background-repeat: no-repeat; background-position: right 15px center; background-size: 12px; }
.ifsc-finder-form select:focus, .ifsc-finder-form input[type="text"]:focus { border-color: #80bdff; box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); outline: none; }
.ifsc-finder-form select:disabled { background-color: #e9ecef; cursor: not-allowed; opacity: 0.7; }
#ifsc-search-button { width: 100%; padding: 12px 15px; font-size: 16px; font-weight: 600; font-family: inherit; color: #fff; background: linear-gradient(45deg, #007bff, #0056b3); border: none; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2); }
#ifsc-search-button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3); }

/* --- REVISED: Results Styling to Match Screenshot --- */
#ifsc-results-wrapper { margin-top: 25px; transition: opacity 0.5s ease; }
#ifsc-results-card { background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 12px; padding: 10px 25px; }
.ifsc-result-row {
    display: grid;
    /* Defines 3 columns: Label | Value | Icon */
    grid-template-columns: 120px 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e0e5e9;
    font-size: 15px;
}
.ifsc-result-row:last-child { border-bottom: none; }
.ifsc-result-label { color: #6c757d; font-weight: 400; text-align: left; }
.ifsc-result-value {
    color: #343a40;
    font-weight: 600;
    text-align: left; /* Ensures value text is aligned left */
    word-break: break-word; /* Prevents long bank names from overflowing */
}
.ifsc-result-value.ifsc-code { color: #007bff; }
.copy-action {
    cursor: pointer;
    justify-self: end; /* Aligns the icon to the far right of its column */
}
.copy-icon {
    display: block; /* Ensures proper alignment and hover effect */
    color: #adb5bd;
    transition: color 0.2s, transform 0.2s;
}
.copy-action:hover .copy-icon { color: #007bff; transform: scale(1.15); }

/* --- Loader & Toast --- */
.ifsc-results-loader { text-align: center; padding: 40px 0; }
.spinner { border: 4px solid rgba(0,0,0,0.1); width: 36px; height: 36px; border-radius: 50%; border-left-color: #007bff; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { 100% { transform: rotate(360deg); } }
#ifsc-toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.ifsc-toast { padding: 12px 20px; border-radius: 8px; color: #fff; font-size: 15px; font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideIn 0.3s ease forwards, fadeOut 0.5s ease 3s forwards; display: flex; align-items: center; gap: 10px; }
.ifsc-toast.success { background-color: #28a745; }
.ifsc-toast.error { background-color: #dc3545; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; transform: scale(0.9); } }

/* --- Mobile Responsiveness --- */
@media (max-width: 640px) {
    .ifsc-finder-container { margin: 20px 15px; padding: 20px; }
    .ifsc-tab-button { font-size: 14px; }
    .ifsc-result-row {
        grid-template-columns: 1fr auto; /* On mobile: Value | Icon */
        gap: 10px;
        padding: 12px 0;
    }
    .ifsc-result-label {
        grid-column: 1 / -1; /* Label takes full width on its own line */
        font-size: 13px;
        margin-bottom: -8px; /* Pull the value line up closer */
    }
    .ifsc-result-value { grid-column: 1; }
    .copy-action { grid-column: 2; }
}