/* Basharat Author Manager - Frontend Styles */

/* Author Processing Container */
.basharat-author-processing-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.basharat-author-processing-content h2 {
    margin-bottom: 15px;
    color: #333;
}

.basharat-process-author-btn {
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 4px;
    margin: 20px 0;
    cursor: pointer;
}

/* Progress Bar */
.basharat-processing-indicator {
    margin: 30px 0;
}

.basharat-progress-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.basharat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.3s ease;
    animation: progress-animation 2s infinite;
}

@keyframes progress-animation {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.basharat-processing-status {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

/* Author Archive Info */
.basharat-author-archive-info {
    margin-bottom: 40px;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.basharat-author-archive-image {
    margin-bottom: 20px;
}

.basharat-author-archive-image img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.basharat-author-archive-name {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.basharat-author-archive-book-count {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.basharat-author-archive-biography {
    text-align: justify;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    font-size: 16px;
    color: #444;
}

/* Author Result Display */
.basharat-author-result {
    margin-top: 30px;
}

.basharat-author-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.basharat-author-image img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.basharat-author-details {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.basharat-author-name {
    font-size: 28px;
    margin-bottom: 5px;
}

.basharat-author-book-count {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.basharat-author-biography {
    text-align: justify;
    line-height: 1.8;
    font-size: 15px;
}

/* Authors List Shortcode */
.basharat-authors-list-container {
    margin: 30px 0;
    direction: rtl;
}

/* Authors Filter Section - Modern Design */
.basharat-authors-filter {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.basharat-authors-filter-form {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 16px;
    align-items: end;
}

.basharat-authors-filter-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    white-space: nowrap;
}

.basharat-authors-sort select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    min-width: 200px;
    text-align: center;
    font-size: 15px;
    color: #333;
    background: #ffffff;
    cursor: pointer;
    height: 40px; /* Match input height */
}

.basharat-authors-search-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.basharat-authors-sort {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.basharat-authors-filter label {
    font-weight: 600;
    font-size: 13px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.basharat-authors-filter input[type="text"] {
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid transparent;
    font-size: 15px;
    background: #ffffff;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 260px;
    width: 100%;
}

.basharat-authors-filter input[type="text"]:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 0 0 3px rgba(255,255,255,0.3);
}

.basharat-authors-filter input[type="text"]::placeholder {
    color: #999;
}

.basharat-authors-filter select {
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid transparent;
    font-size: 15px;
    background: #ffffff;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 200px;
    width: 100%;
}

.basharat-authors-filter select:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 0 0 3px rgba(255,255,255,0.3);
}

.basharat-authors-filter .button {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    background: #ffffff;
    color: #667eea;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 100px;
    width: 100%;
}

.basharat-authors-filter .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background: #f8f9ff;
}

.basharat-authors-filter .button:active {
    transform: translateY(0);
}

.basharat-authors-filter .button[type="submit"] {
    background: #48bb78;
    color: #ffffff;
}

.basharat-authors-filter .button[type="submit"]:hover {
    background: #38a169;
}

.basharat-authors-filter .button:not([type="submit"]) {
    background: #ffffff;
    color: #667eea;
}

.basharat-authors-filter .button:not([type="submit"]):hover {
    background: #f8f9ff;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .basharat-authors-filter-form {
        grid-template-columns: 1fr 1fr;
    }
    
    .basharat-authors-filter-buttons {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

@media (max-width: 992px) {
    .basharat-authors-filter-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .basharat-authors-search-box,
    .basharat-authors-sort,
    .basharat-authors-filter-buttons {
        width: 100%;
    }
    
    .basharat-authors-filter-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .basharat-authors-filter-buttons .button {
        width: 100%;
    }
    
    .basharat-authors-filter input[type="text"],
    .basharat-authors-filter select {
        width: 100%;
        min-width: auto;
    }
    
    .basharat-authors-filter .button {
        width: 100%;
    }
    
    .basharat-authors-filter-form > .button {
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .basharat-authors-filter {
        padding: 20px 15px;
    }
    
    .basharat-authors-filter label {
        font-size: 12px;
    }
    
    .basharat-authors-filter input[type="text"],
    .basharat-authors-filter select {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .basharat-authors-filter .button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

.basharat-authors-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns-desktop, 5), 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .basharat-authors-grid {
        grid-template-columns: repeat(var(--columns-mobile, 2), 1fr);
        gap: 15px;
    }
}

.basharat-author-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.basharat-author-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.basharat-author-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 15px;
    text-align: center;
}

.basharat-author-item-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 12px;
}

.basharat-author-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.basharat-author-no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.basharat-author-no-image span {
    font-size: 48px;
    color: #fff;
    font-weight: bold;
}

.basharat-author-item-name {
    font-size: 18px;
    margin: 0 0 8px;
    font-weight: 600;
    color: #333;
}

.basharat-author-item-count {
    font-size: 14px;
    color: #666;
    margin: 0;
    direction: rtl;
}

.basharat-authors-pagination {
    text-align: center;
    margin-top: 30px;
}

.basharat-authors-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    border-radius: 4px;
    text-decoration: none;
    background: #f0f0f0;
    color: #333;
}

.basharat-authors-pagination .page-numbers.current {
    background: #2271b1;
    color: #fff;
}

.basharat-authors-pagination .page-numbers:hover {
    background: #2271b1;
    color: #fff;
}

/* Product Tab */
.basharat-author-tab-content {
    padding: 20px 0;
}

.basharat-author-info {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.basharat-author-image {
    flex-shrink: 0;
}

.basharat-author-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
}

.basharat-author-details {
    flex: 1;
}

@media (max-width: 768px) {
    .basharat-author-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .basharat-author-archive-info {
        padding: 20px;
    }
    
    .basharat-author-archive-name {
        font-size: 24px;
    }
}

/* Manual Entry Form */
.basharat-manual-author-form,
.basharat-manual-author-form-container {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    direction: ltr;
}

.basharat-manual-author-save-form label {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.basharat-manual-author-save-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.basharat-manual-author-image-preview {
    margin-top: 10px;
}

.basharat-manual-author-image-preview img {
    display: block;
    max-width: 200px;
    border-radius: 8px;
}
