.bif-container {
    max-width: 500px;
    margin: 2em auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.bif-card {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.bif-card h3 {
    margin-top: 0;
    color: #333;
}

.bif-card p {
    color: #666;
    font-size: 15px;
}

.bif-form-group input[type="file"] {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.bif-upload-label {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    background-color: #3498db;
    display: inline-block;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.bif-upload-label:hover {
    background-color: #2980b9;
}

.bif-upload-label svg {
    margin-right: 8px;
    vertical-align: middle;
    fill: currentColor;
}

.bif-submit-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.bif-submit-btn:hover {
    background-color: #27ae60;
}
.bif-submit-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.bif-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bif-status.error { background-color: #e74c3c; color: white; }
.bif-status.success { background-color: #2ecc71; color: white; }

.bif-result {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}
.bif-result h4 { margin: 0 0 15px; }
.bif-result img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
}

.bif-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.bif-btn {
    text-decoration: none;
    color: white;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: bold;
    transition: opacity 0.2s;
}
.bif-btn:hover { opacity: 0.85; }
.bif-btn-download { background-color: #3498db; }
.bif-btn-share { background-color: #3b5998; }

.loader {
  border: 4px solid #f3f3f3;
  border-radius: 50%;
  border-top: 4px solid #3498db;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-left: 10px;
}

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

.bif-btn.disabled {
    background-color: #bdc3c7 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.bif-options-group {
    margin-top: 20px;
    text-align: center;
}

.bif-radio-toolbar {
    display: inline-flex;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
}

.bif-radio-toolbar input[type="radio"] {
    display: none;
}

.bif-radio-toolbar label {
    padding: 8px 16px;
    cursor: pointer;
    background-color: #f3f4f6;
    color: #555;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border-left: 1px solid #ccc;
}
.bif-radio-toolbar label:first-of-type {
    border-left: none;
}


.bif-radio-toolbar input[type="radio"]:checked + label {
    background-color: #3498db;
    color: white;
}

.bif-option-description {
    font-size: 13px;
    color: #777;
    margin-top: 8px;
    line-height: 1.5;
}

/* Container cho Cropper.js */
.bif-cropper-container {
    width: 100%;
    height: 350px;
    margin-bottom: 15px;
    background-color: #eee;
}

#bif-image-to-crop {
    display: block;
    max-width: 100%;
}

/* Thanh trượt Zoom */
#bif-zoom-slider-container {
    text-align: left;
    margin-top: 15px;
}
#bif-zoom-slider-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}
.bif-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
}
.bif-slider:hover {
    opacity: 1;
}
.bif-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}
.bif-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

/* Nút Reset */
.bif-btn-reset {
    margin-top: 15px;
    background-color: #95a5a6;
    border: none;
    font-size: 1em;
    padding: 8px 16px;
    width: auto;
}
.bif-btn-reset:hover {
    background-color: #7f8c8d;
}