/**
 * Custom File Input - English Text
 * Ẩn text tiếng Việt mặc định của trình duyệt, thay bằng button tiếng Anh
 */

/* ============================================
   1. Ẩn input file gốc (nhưng vẫn hoạt động)
   ============================================ */
.gcc-file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.gcc-file-input-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
    width: 0.1px;
    height: 0.1px;
}

/* ============================================
   2. Button tùy chỉnh (tiếng Anh)
   ============================================ */
.gcc-file-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gcc-file-button:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.gcc-file-button:active {
    background: #f3f4f6;
}

/* Icon cho button */
.gcc-file-button::before {
    content: "📁";
    font-size: 18px;
}

/* ============================================
   3. Hiển thị tên file đã chọn
   ============================================ */
.gcc-file-name {
    display: inline-block;
    margin-left: 12px;
    color: #6b7280;
    font-size: 13px;
    font-style: italic;
}

.gcc-file-name.has-file {
    color: #059669;
    font-weight: 500;
    font-style: normal;
}

.gcc-file-name.has-file::before {
    content: "✓ ";
    color: #10b981;
}

/* ============================================
   4. Multiple files - hiển thị số lượng
   ============================================ */
.gcc-file-count {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ============================================
   5. Disabled state
   ============================================ */
.gcc-file-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   6. Focus state (accessibility)
   ============================================ */
.gcc-file-input-wrapper input[type="file"]:focus + .gcc-file-button {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ============================================
   7. Drag & Drop visual feedback
   ============================================ */
.gcc-file-input-wrapper.dragging .gcc-file-button {
    background: #eff6ff;
    border-color: #3b82f6;
    border-style: dashed;
}

/* ============================================
   8. Mobile responsive
   ============================================ */
@media (max-width: 640px) {
    .gcc-file-button {
        padding: 12px 14px;
        font-size: 15px;
        width: 100%;
        justify-content: center;
    }
    
    .gcc-file-name {
        display: block;
        margin-left: 0;
        margin-top: 8px;
    }
}

/* ============================================
   9. Integration với form hiện tại
   ============================================ */
.gcc-form p > label > .gcc-file-input-wrapper {
    margin-top: 4px;
}

/* Description text dưới input */
.gcc-form p > label > .gcc-file-input-wrapper + .description {
    margin-top: 8px;
}