/**
 * Futaba Transmitter Picture Setup v2.1.0
 */

/* Container */
.futaba-picture-setup {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.futaba-picture-setup h2 {
    margin-bottom: 5px;
}

.futaba-desc {
    color: #666;
    margin-bottom: 20px;
}

/* Upload form */
#futaba-upload-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 2px dashed #ccc;
    border-radius: 8px;
}

.futaba-upload-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.futaba-upload-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #e9ecef;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    color: #495057;
}

#futaba-file-input {
    display: none;
}

/* Status messages */
#futaba-upload-status {
    display: none;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.futaba-status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

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

.futaba-status-loading {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Table */
.futaba-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.futaba-table th,
.futaba-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.futaba-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
}

.futaba-table tbody tr:hover {
    background: #f8f9fa;
}

.futaba-thumb {
    width: 80px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.futaba-actions {
    display: flex;
    gap: 6px;
}

.futaba-empty {
    text-align: center;
    color: #888;
    padding: 30px 0;
}

/* Buttons */
.futaba-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.futaba-btn:hover {
    background: #f0f0f0;
}

.futaba-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.futaba-btn-primary {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.futaba-btn-primary:hover {
    background: #005a87;
}

.futaba-btn-download {
    background: #5cb85c;
    color: #fff;
    border-color: #4cae4c;
    text-decoration: none;
}

.futaba-btn-download:hover {
    background: #449d44;
    color: #fff;
    text-decoration: none;
}

.futaba-btn-crop {
    background: #f0ad4e;
    color: #fff;
    border-color: #eea236;
}

.futaba-btn-crop:hover {
    background: #ec971f;
}

.futaba-btn-danger {
    background: #fff;
    color: #d9534f;
    border-color: #d9534f;
}

.futaba-btn-danger:hover {
    background: #d9534f;
    color: #fff;
}

.futaba-btn-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    padding: 0 5px;
    color: #666;
}

.futaba-btn-close:hover {
    color: #000;
    background: none;
}

/* Crop Modal Overlay */
#futaba-crop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#futaba-crop-modal {
    background: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.futaba-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.futaba-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.futaba-modal-body {
    padding: 20px;
    overflow: auto;
    flex: 1;
}

#futaba-crop-container {
    max-height: 50vh;
}

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

.futaba-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
}

/* Utility */
.futaba-hidden {
    display: none !important;
}
