/* ABC Trade Search Plugin Styles - Version 2.0 */

#abc-trade-search-container {
    font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.abc-search-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Left Sidebar Styles */
.abc-left-sidebar {
    flex: 0 0 300px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.abc-sidebar-title h3 {
    background: linear-gradient(135deg, #dbb768, #c8a355);
    color: white;
    padding: 12px 18px;
    margin: -20px -20px 25px -20px;
    border-radius: 8px 8px 0 0;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    border-bottom: 2px solid #b8984a;
}

.abc-sidebar-title i {
    font-style: italic;
    opacity: 0.9;
}

.abc-search-options {
    margin-bottom: 20px;
}

.abc-search-options label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.abc-search-options label:hover {
    background: #e8f4fd;
}

.abc-search-options input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.1);
}

.abc-search-input {
    margin-bottom: 20px;
}

.abc-search-input input[type="text"] {
    width: 100%;
    height: 45px;
    padding: 8px 15px;
    border: 2px solid #eee;
    background-color: #fff;
    color: #333;
    font: normal 14px "Trebuchet MS", Helvetica, Arial, sans-serif;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.abc-search-input input[type="text"]:focus {
    outline: none;
    border-color: #0099cc;
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.1);
}

.abc-searchsubmit {
    padding: 14px 25px;
    background: linear-gradient(135deg, #0099cc, #007aa3);
    color: #fff;
    border: none;
    border-bottom: 3px solid #005580;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.abc-searchsubmit:hover {
    background: linear-gradient(135deg, #007aa3, #005580);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 153, 204, 0.3);
}

.abc-searchsubmit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 153, 204, 0.3);
}

/* Right Content Styles */
.abc-content-right {
    flex: 1;
    min-height: 400px;
}

.abc-loading {
    text-align: center;
    padding: 60px 40px;
    font-size: 18px;
    color: #666;
}

.abc-loading::after {
    content: "";
    display: block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0099cc;
    border-radius: 50%;
    animation: abc-spin 1s linear infinite;
    margin: 20px auto 0;
}

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

/* Table Styles */
.abc-table-list {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

.abc-table-list th,
.abc-table-list td {
    padding: 15px 20px;
    border: 1px solid rgba(255,255,255,0.8);
    text-align: left;
    line-height: 1.5;
}

.abc-table-header {
    background: linear-gradient(135deg, #dbb768, #c8a355) !important;
    color: white;
    font-weight: bold;
    font-size: 20px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    padding: 20px !important;
}

.abc-table-list th {
    background: linear-gradient(135deg, #f3ce7d, #e6c170);
    font-weight: bold;
    color: #333;
    width: 200px;
    text-shadow: 0 1px 1px rgba(255,255,255,0.3);
    font-size: 14px;
}

.abc-table-list td {
    background: linear-gradient(135deg, #ffea97, #ffe082);
    color: #333;
    font-size: 14px;
}

.abc-table-list tr:nth-child(even) td {
    background: linear-gradient(135deg, #fff8dc, #ffecb3);
}

.abc-table-list tr:hover td {
    background: linear-gradient(135deg, #ffe082, #ffd54f);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Button Styles */
.abc-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #0f6674;
}

.abc-btn:hover {
    background: linear-gradient(135deg, #138496, #0f6674);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.abc-btn:active {
    transform: translateY(0);
}

.abc-btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.abc-icon-book:before {
    content: "📄 ";
    margin-right: 5px;
}

/* Error Table */
.abc-error-table {
    margin: 40px auto;
    width: 70%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.abc-error-table td {
    background: linear-gradient(135deg, #f8d7da, #f1b6bb);
    color: #721c24;
    text-align: center;
    padding: 30px 20px;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 0 1px 1px rgba(255,255,255,0.3);
}

/* PDF Loading Animation */
#pdf-loading {
    color: #666;
    font-style: italic;
    animation: abc-pulse 1.5s ease-in-out infinite alternate;
}

@keyframes abc-pulse {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    #abc-trade-search-container {
        padding: 15px;
        margin: 10px;
    }
    
    .abc-search-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    
    .abc-left-sidebar {
        flex: none;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .abc-table-list th {
        width: 120px;
        font-size: 12px;
        padding: 10px 8px;
    }
    
    .abc-table-list th,
    .abc-table-list td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .abc-table-header {
        font-size: 18px !important;
        padding: 15px !important;
    }
    
    .abc-error-table {
        width: 95%;
    }
    
    .abc-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .abc-search-wrapper {
        gap: 15px;
    }
    
    .abc-table-list th,
    .abc-table-list td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .abc-table-list th {
        width: 100px;
    }
    
    .abc-searchsubmit {
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* Focus States for Accessibility */
.abc-search-options input[type="radio"]:focus {
    outline: 2px solid #0099cc;
    outline-offset: 3px;
    border-radius: 50%;
}

.abc-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.4);
}

.abc-searchsubmit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.4);
}

/* Print Styles */
@media print {
    #abc-trade-search-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .abc-left-sidebar {
        display: none;
    }
    
    .abc-content-right {
        width: 100%;
    }
    
    .abc-table-list {
        box-shadow: none;
        border: 2px solid #333;
    }
}

/* Animation for table appearance */
.abc-table-list {
    animation: abc-fadeInUp 0.6s ease-out;
}

@keyframes abc-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success state animation */
.abc-table-list.success-state tr:nth-child(even) td {
    animation: abc-highlight 2s ease-in-out;
}

@keyframes abc-highlight {
    0%, 100% { background: linear-gradient(135deg, #fff8dc, #ffecb3); }
    50% { background: linear-gradient(135deg, #e8f5e8, #c8e6c9); }
} 