/**
 * Bank IFSC Finder Public Styles
 */

/* Base Styles */
.bank-ifsc-finder-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.5;
}

.bifsc-header {
    text-align: center;
    margin-bottom: 30px;
}

.bifsc-title {
    color: #1e88e5;
    margin-bottom: 10px;
    font-size: 28px;
}

.bifsc-description {
    color: #666;
    font-size: 16px;
    margin: 0 0 20px;
}

/* Search Container */
.bifsc-search-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

/* Tabs */
.bifsc-search-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.bifsc-tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
}

.bifsc-tab:hover {
    background: #f1f1f1;
    color: #1e88e5;
}

.bifsc-tab.active {
    background: #fff;
    color: #1e88e5;
    border-bottom-color: #1e88e5;
}

.bifsc-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 5px;
}

.bifsc-icon-search {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%231e88e5"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
}

.bifsc-icon-bank {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%231e88e5"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.91c-1.61-.31-3-1.39-3.13-3.09h2.03c.12.72.75 1.29 1.99 1.29 1.12 0 2.13-.6 2.13-1.75 0-.88-.64-1.4-2.08-1.86-1.94-.61-3.28-1.39-3.28-3.23 0-1.54 1.21-2.72 2.67-3.05V4.5h2.67v1.91c1.66.29 2.67 1.69 2.73 3.09h-2.02c-.09-.92-.71-1.29-1.77-1.29-1 0-1.92.6-1.92 1.55 0 .75.54 1.25 2.06 1.75 1.94.63 3.28 1.49 3.28 3.32 0 1.68-1.18 2.93-2.69 3.26z"/></svg>');
}

.bifsc-icon-location {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%231e88e5"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></svg>');
}

.bifsc-icon-error {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23e53935"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>');
}

/* Tab Content */
.bifsc-search-content {
    padding: 20px;
    background: #fff;
}

.bifsc-tab-content {
    display: none;
}

.bifsc-tab-content.active {
    display: block;
}

/* Form Styles */
.bifsc-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.bifsc-form-group {
    flex: 1;
    min-width: 200px;
}

.bifsc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.bifsc-form-group input,
.bifsc-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
    text-overflow: ellipsis;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
}

/* Custom styling for bank select dropdown */
.bifsc-bank-select-container {
    position: relative;
    width: 100%;
}

/* Increase select dropdown width to show full bank names */
#bifsc-bank-select {
    min-width: 100%;
    width: 100%;
    font-size: 14px; /* Slightly smaller font to fit more text */
    height: auto; /* Allow for multiple lines if needed */
    padding-right: 30px; /* Space for the dropdown arrow */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px;
    text-overflow: ellipsis;
}

/* Style dropdown options to ensure they display full text */
#bifsc-bank-select option {
    padding: 8px;
    white-space: normal; /* Allow text to wrap */
    font-size: 14px;
}

.bifsc-form-group input:focus,
.bifsc-form-group select:focus {
    border-color: #1e88e5;
    outline: none;
    box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.25);
}

.bifsc-search-button {
    background-color: #1e88e5;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bifsc-search-button:hover {
    background-color: #1976d2;
}

/* Error Message */
.bifsc-error-message {
    margin-bottom: 20px;
}

.bifsc-alert {
    padding: 12px 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
}

.bifsc-alert-error {
    background-color: #ffebee;
    color: #e53935;
    border: 1px solid #ffcdd2;
}

.bifsc-alert .bifsc-icon {
    margin-right: 10px;
}

/* Loading */
.bifsc-loading {
    text-align: center;
    padding: 30px;
}

.bifsc-loader {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1e88e5;
    border-radius: 50%;
    animation: bifsc-spin 1s linear infinite;
    margin-bottom: 10px;
}

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

/* Results Container */
.bifsc-results-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.bifsc-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.bifsc-results-header h3 {
    margin: 0;
    color: #1e88e5;
}

.bifsc-results-count {
    color: #666;
    font-size: 14px;
}

.bifsc-results-count span {
    font-weight: bold;
    color: #1e88e5;
}

.bifsc-results-content {
    padding: 20px;
}

/* Results Table */
.bifsc-table {
    width: 100%;
    border-collapse: collapse;
}

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

.bifsc-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

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

.bifsc-table .bifsc-ifsc {
    font-weight: bold;
    color: #1e88e5;
}

/* Bank Cards */
.bifsc-bank-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.bifsc-bank-card {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.bifsc-bank-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.bifsc-bank-name {
    font-weight: 600;
    color: #1e88e5;
    margin-bottom: 5px;
}

.bifsc-bank-code {
    color: #666;
    font-size: 14px;
}

/* Branch Cards */
.bifsc-branch-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.bifsc-branch-card {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.bifsc-branch-card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.bifsc-branch-name {
    font-weight: 600;
    color: #1e88e5;
    margin-bottom: 5px;
}

.bifsc-branch-ifsc {
    color: #1e88e5;
    font-weight: 500;
}

.bifsc-branch-detail {
    margin-bottom: 8px;
}

.bifsc-branch-label {
    font-weight: 500;
    color: #555;
    display: inline-block;
    min-width: 80px;
}

/* Info Box */
.bifsc-info-box {
    background: #f1f8e9;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.bifsc-info-box h4 {
    color: #43a047;
    margin-top: 0;
    margin-bottom: 10px;
}

.bifsc-info-box p {
    margin-bottom: 10px;
}

.bifsc-info-box ul {
    margin-left: 20px;
}

.bifsc-info-box li {
    margin-bottom: 5px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .bifsc-search-tabs {
        flex-direction: column;
    }
    
    .bifsc-tab {
        border-bottom: 1px solid #e0e0e0;
        border-left: 3px solid transparent;
    }
    
    .bifsc-tab.active {
        border-bottom-color: #e0e0e0;
        border-left-color: #1e88e5;
    }
    
    .bifsc-search-form {
        flex-direction: column;
    }
    
    .bifsc-form-group {
        width: 100%;
    }
    
    .bifsc-results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bifsc-results-count {
        margin-top: 5px;
    }
    
    .bifsc-table {
        display: block;
        overflow-x: auto;
    }
    
    .bifsc-bank-cards,
    .bifsc-branch-cards {
        grid-template-columns: 1fr;
    }
}

/* Modern Layout */
.bifsc-modern .bifsc-search-container {
    border-radius: 20px;
    overflow: hidden;
}

.bifsc-modern .bifsc-search-tabs {
    background: #1e88e5;
}

.bifsc-modern .bifsc-tab {
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 3px solid transparent;
}

.bifsc-modern .bifsc-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.bifsc-modern .bifsc-tab.active {
    background: #fff;
    color: #1e88e5;
}

.bifsc-modern .bifsc-icon-search,
.bifsc-modern .bifsc-icon-bank,
.bifsc-modern .bifsc-icon-location {
    filter: brightness(1.8);
}

.bifsc-modern .bifsc-tab.active .bifsc-icon {
    filter: none;
}

.bifsc-modern .bifsc-search-button {
    background: #1e88e5;
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    box-shadow: 0 4px 6px rgba(30, 136, 229, 0.3);
}

.bifsc-modern .bifsc-search-button:hover {
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
    box-shadow: 0 6px 8px rgba(30, 136, 229, 0.4);
}

.bifsc-modern .bifsc-results-container {
    border-radius: 20px;
}

.bifsc-modern .bifsc-info-box {
    border-radius: 20px;
}