/**
 * Public-facing stylesheet for the YouTube Fan Token Calculator plugin.
 *
 * @link       https://yourwebsite.com
 * @since      1.0.0
 *
 * @package    Youtube_Fan_Token_Calculator
 * @subpackage Youtube_Fan_Token_Calculator/public/css
 */

.yftc-calculator-wrapper {
    max-width: 700px;
    margin: 20px auto;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-radius: 8px;
    font-family: Arial, sans-serif;
    color: #333;
}

.yftc-calculator-wrapper h2 {
    text-align: center;
    color: #333;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 26px;
    line-height: 1.2;
}

.yftc-form-group {
    margin-bottom: 20px;
}

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

.yftc-form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    transition: border-color 0.3s ease;
}

.yftc-form-group input[type="text"]:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.yftc-submit-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.yftc-submit-btn:hover {
    background-color: #005a87;
    transform: translateY(-1px);
}

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

.yftc-message, .yftc-error-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.yftc-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.yftc-error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.yftc-results {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.yftc-channel-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9e9e9;
}

.yftc-channel-info img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

.yftc-channel-details h3 {
    margin: 0 0 5px 0;
    font-size: 22px;
    color: #0073aa;
}

.yftc-channel-details p {
    margin: 0;
    font-size: 15px;
    color: #666;
}

.yftc-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
}

.yftc-result-item:last-child {
    border-bottom: none;
}

.yftc-result-item span:first-child {
    font-weight: bold;
    color: #555;
}

.yftc-result-item span:last-child {
    font-size: 18px;
    color: #0073aa;
    font-weight: bold;
}

.yftc-result-item.highlight span:last-child {
    color: #28a745; /* Green for key results */
    font-size: 20px;
}

.yftc-loading-spinner {
    display: none; /* Hidden by default, shown by JS */
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    animation: spin 1s linear infinite;
    margin: 15px auto;
}

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

/* Responsive adjustments */
@media (max-width: 600px) {
    .yftc-calculator-wrapper {
        padding: 15px;
        margin: 10px;
    }
    .yftc-channel-info {
        flex-direction: column;
        text-align: center;
    }
    .yftc-channel-info img {
        margin-bottom: 10px;
    }
}