/**
 * 游戏资源反馈插件 - 前端样式
 */

/* ================================================================
   反馈按钮样式 - 与 fxo-action-bar 风格一致
   ================================================================ */

.grf-feedback-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 14px;
    background-color: #f5f5f5;
    color: #555;
    font-size: 13px;
    font-weight: normal;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    user-select: none;
    white-space: nowrap;
    vertical-align: middle;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    line-height: 1.5;
    outline: none;
    margin: 0 0 0 auto;
}

.grf-feedback-button:hover {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
    text-decoration: none;
}

.grf-feedback-button:active {
    opacity: 0.9;
}

.grf-feedback-button:focus {
    outline: none;
}

/* ================================================================
   Modal 弹窗样式
   ================================================================ */

.grf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: grf-fadeIn 0.3s ease;
}

.grf-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    animation: grf-slideUp 0.3s ease;
}

@keyframes grf-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes grf-slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.grf-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.grf-modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.grf-modal-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    flex: 1;
    padding-right: 16px;
    line-height: 1.4;
}

.grf-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #aaa;
    cursor: pointer;
    padding: 4px 6px;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.grf-modal-close:hover {
    color: #555;
    background: #eee;
}

.grf-modal-body {
    padding: 20px 18px;
    flex: 1;
    overflow-y: auto;
}

.grf-modal-footer {
    padding: 0 18px 20px;
    border-top: none;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: transparent;
}

/* ================================================================
   提示文本
   ================================================================ */

.grf-tips {
    color: #666;
    font-size: 13px;
    margin-bottom: 16px;
    padding: 12px;
    background-color: #f0f8ff;
    border-left: 4px solid #17a2b8;
    border-radius: 4px;
    line-height: 1.6;
}

/* ================================================================
   表单样式
   ================================================================ */

.grf-feedback-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.grf-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
}

.grf-form-group:last-child {
    margin-bottom: 0;
}

.grf-form-label {
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin-bottom: 8px;
    line-height: 1.4;
}

.grf-required {
    color: #dc3545;
    margin-left: 4px;
}

.grf-form-control {
    padding: 9px 11px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    background: #fafafa;
    color: #333;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    box-sizing: border-box;
    outline: none;
    line-height: 1.6;
}

.grf-form-control:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
    background: #fff;
}

.grf-form-control::placeholder {
    color: #bbb;
}

.grf-contact-captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 1.15fr);
    gap: 12px;
    align-items: end;
}

.grf-contact-captcha-row .grf-form-group {
    min-width: 0;
    margin-bottom: 0;
}

.grf-contact-captcha-row .grf-form-label {
    margin-bottom: 6px;
}

/* ================================================================
   分类按钮
   ================================================================ */

.grf-category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.grf-category-btn {
    padding: 6px 14px;
    background-color: #f5f5f5;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    font-weight: normal;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    line-height: 1.5;
}

.grf-category-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    background-color: #fff5f5;
    text-decoration: none;
}

.grf-category-btn.active {
    background-color: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

/* ================================================================
   子分类选项
   ================================================================ */

.grf-subcategory-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.grf-subcategory-item {
    display: flex;
    align-items: center;
}

.grf-subcategory-item input[type="checkbox"] {
    margin-right: 6px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #e74c3c;
}

.grf-subcategory-item label {
    cursor: pointer;
    font-size: 13px;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

/* ================================================================
   验证码
   ================================================================ */

.grf-captcha-wrapper {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 0;
}

.grf-captcha-question {
    flex: 0 0 76px;
    padding: 8px 10px;
    background-color: #fafafa;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-align: center;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    box-sizing: border-box;
    white-space: nowrap;
}

.grf-captcha-answer {
    flex: 1 1 68px;
    min-width: 58px;
    text-align: center;
}

.grf-captcha-refresh {
    flex: 0 0 auto;
    padding: 8px 10px;
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    line-height: 1.5;
    font-family: inherit;
}

.grf-captcha-refresh:hover {
    background-color: #eaeaea;
    border-color: #ccc;
    color: #333;
}

/* ================================================================
   按钮
   ================================================================ */

.grf-btn {
    padding: 8px 22px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1.5;
    font-family: inherit;
}

.grf-btn-primary {
    background-color: #e74c3c;
    color: white;
}

.grf-btn-primary:hover {
    background-color: #c2301f;
    text-decoration: none;
}

.grf-btn-primary:active {
    opacity: 0.9;
}

.grf-btn-primary:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.grf-btn-secondary {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.grf-btn-secondary:hover {
    background-color: #eaeaea;
    border-color: #ccc;
    color: #333;
    text-decoration: none;
}

.grf-btn-secondary:active {
    opacity: 0.9;
}

.grf-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ================================================================
   加载状态
   ================================================================ */

.grf-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: grf-spin 1s linear infinite;
}

@keyframes grf-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================================================
   提示消息
   ================================================================ */

.grf-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    display: none;
}

.grf-message.show {
    display: block;
    animation: grf-slideDown 0.3s ease;
}

@keyframes grf-slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grf-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.grf-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.grf-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.grf-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ================================================================
   响应式设计
   ================================================================ */

@media (max-width: 640px) {
    .grf-modal {
        width: 95%;
        max-height: 95vh;
        max-width: 100%;
    }

    .grf-modal-header {
        padding: 12px 14px;
    }

    .grf-modal-title {
        font-size: 14px;
    }

    .grf-modal-body {
        padding: 16px 14px;
    }

    .grf-modal-footer {
        padding: 0 14px 16px;
        gap: 8px;
    }

    .grf-category-buttons {
        gap: 6px;
    }

    .grf-category-btn {
        padding: 5px 12px;
        font-size: 12px;
    }

    .grf-feedback-button {
        padding: 4px 12px;
        font-size: 12px;
    }

    .grf-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .grf-form-control {
        font-size: 12px;
        padding: 8px 10px;
    }

    .grf-form-group {
        margin-bottom: 12px;
    }

    .grf-contact-captcha-row {
        grid-template-columns: minmax(0, 0.9fr) minmax(190px, 1.1fr);
        gap: 8px;
    }

    .grf-contact-captcha-row .grf-form-label {
        font-size: 12px;
        margin-bottom: 5px;
    }

    .grf-captcha-wrapper {
        gap: 4px;
    }

    .grf-captcha-question {
        flex-basis: 66px;
        min-height: 34px;
        padding: 7px 6px;
        font-size: 12px;
    }

    .grf-captcha-answer {
        min-width: 46px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .grf-captcha-refresh {
        padding: 7px 8px;
        font-size: 12px;
    }
}
